zeroclaw-labs/zeroclaw · error

channel plugin metadata changed while recreating an…

Error message

channel plugin metadata changed while recreating an interrupted instance

What it means

Safety refusal while rebuilding an interrupted warm channel-plugin instance: the plugin component metadata observed now does not match what the interrupted instance was originally created from. Recreating from mismatched metadata could run a different plugin version under stale assumptions, so reinstantiate refuses instead of silently substituting the new component.

Solutions

  1. Reinstall or restart the channel plugin cleanly; do not change its metadata while an interrupted instance is being recreated.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/zeroclaw-plugins/src/wasm_channel.rs:158 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23). Data as JSON: /api/errors/f3e68326d0020f6f. Report an issue: GitHub.

Appendix: source

Thrown at crates/zeroclaw-plugins/src/wasm_channel.rs:158

    /// Rebuild an interrupted warm instance from the host-owned component,
    /// scope, generation-scoped config snapshot, and limits, reattaching the
    /// queued inbound backlog. A message the interrupted call had already
    /// dequeued through `inbound-poll` is not requeued: inbound delivery to
    /// the guest is at-most-once across an interruption, and only the
    /// still-queued backlog survives reconstruction.
    /// This does not lock `state`, so the shared call boundary may invoke it
    /// while holding the slot lock.
    async fn reinstantiate(&self) -> Result<(Store<PluginState>, ChannelPlugin)> {
        let instance = self
            .factory
            .instantiate(&self.endpoint, self.inbound.clone())
            .await?;
        if instance.capabilities != self.capabilities
            || instance.self_handle != self.cached_self_handle
            || instance.self_addressed_mention != self.cached_self_addressed_mention
            || instance.multi_message_delay_ms != self.cached_multi_message_delay_ms
        {
            anyhow::bail!(
                "channel plugin metadata changed while recreating an interrupted instance"
            );
        }
        Ok(instance.state)
    }

    /// Handle to this channel's inbound queue. A host-run listener clones it and
    /// calls [`InboundQueue::enqueue`] for each received message; the plugin
    /// drains them through its imported `inbound` interface.
    pub fn inbound(&self) -> InboundQueue {
        self.inbound.clone()
    }
}

impl ChannelInstanceFactory {
    async fn instantiate(
        &self,
        endpoint: &PluginChannelEndpoint,

View on GitHub (pinned to 88bb9c8533)