zeroclaw-labs/zeroclaw · error · anyhow::Error

channel does not support room invites

Error message

channel does not support room invites

What it means

Phase 5 of `zeroclaw update` (src/commands/update.rs:266) — swap_binary replaces the current executable (Unix: remove then copy; Windows: rename the running exe to a pid-suffixed sidecar, then copy the new one in). When the swap fails, run() attempts rollback_binary from the `<exe>.bak` backup made in Phase 3; if rollback also fails it prints "CRITICAL: Rollback also failed" plus a manual `cp` recovery line, then bails with this message. Typical root causes are filesystem-level: install dir not writable at swap time (permissions changed after the preflight), disk full during the copy, EPERM/ETXTBSY removing the old binary, or a Windows file lock (antivirus scanning the new image).

Source

Thrown at crates/zeroclaw-api/src/channel.rs:909

    /// Redact (delete) a message from the channel.
    async fn redact_message(
        &self,
        _channel_id: &str,
        _message_id: &str,
        _reason: Option<String>,
    ) -> anyhow::Result<()> {
        Ok(())
    }

    /// Create a new platform room/conversation when the channel supports it.
    async fn create_room(&self, _options: &RoomCreationOptions) -> anyhow::Result<String> {
        anyhow::bail!("channel does not support room creation")
    }

    /// Invite a user to an existing platform room/conversation.
    async fn invite_user(&self, _room_id: &str, _user_id: &str) -> anyhow::Result<()> {
        anyhow::bail!("channel does not support room invites")
    }

    /// Request interactive tool-call approval from the channel operator.
    ///
    /// Returns `Ok(Some(response))` when the operator answers within the
    /// channel's configured `approval_timeout_secs`; timeouts surface as
    /// `Deny`. Returns `Ok(None)` only for channels that do not implement
    /// the prompt at all — the caller falls back to its default policy
    /// (typically auto-deny).
    async fn request_approval(
        &self,
        _recipient: &str,
        _request: &ChannelApprovalRequest,
    ) -> anyhow::Result<Option<ChannelApprovalResponse>> {
        Ok(None)
    }

    /// Like [`Channel::request_approval`], but also reports WHO produced the

View on GitHub (pinned to 88bb9c8533)

Solutions

  1. First verify the CLI still runs (`zeroclaw --version`); if not, restore manually with the exact `cp <backup> <exe>` line the command printed (backup lives at <exe>.bak)
  2. Re-run `zeroclaw update` with elevated privileges (sudo on macOS/Linux, Administrator console on Windows) so the swap can write the install dir
  3. Free disk space and ensure the install filesystem is writable and local (not NFS/read-only)
  4. On Windows, exclude the install dir from real-time AV scanning or retry after the scan completes
  5. If swaps keep failing, install from source with ./install.sh --source as a bypass

Example fix

# before
$ zeroclaw update
CRITICAL: Rollback also failed: ... 
Manual recovery: cp /usr/local/bin/zeroclaw.bak /usr/local/bin/zeroclaw
Error: Update failed during swap: ... 

# after
$ cp /usr/local/bin/zeroclaw.bak /usr/local/bin/zeroclaw
$ zeroclaw --version            # confirm the old binary is restored
$ sudo zeroclaw update          # re-run with write access to the install dir
Defensive patterns

Strategy: fallback

Validate before calling

// Caller-side preflight mirroring ensure_install_dir_writable:
// confirm the exe's directory is writable and has room before updating.
fn install_dir_ready(exe: &std::path::Path) -> anyhow::Result<()> {
    let dir = exe.parent().unwrap();
    let probe = dir.join(format!(".probe-{}", std::process::id()));
    std::fs::File::create(&probe)?;
    std::fs::remove_file(&probe)?;
    Ok(())
}

Try / catch

if let Err(e) = update::run(version, force).await {
    if e.to_string().contains("Update failed during swap") {
        // 1. Check the binary still runs: `zeroclaw --version`.
        // 2. If not, restore from <exe>.bak exactly as the printed
        //    `Manual recovery: cp ...` line instructs.
        // 3. Only then re-run update with elevated privileges.
    }
}

Prevention

When it happens

Trigger: `zeroclaw update` reaching Phase 5 and swap_binary erroring: tokio::fs::remove_file/copy/rename failing on the install path — e.g. system-wide install where write access was lost, no space left on device, an AV or indexer holding the new binary on Windows, or a network/noexec mount.

Common situations: Updating a system-wide install without sudo (the Phase-1 writability preflight usually catches this, but privileges can be dropped later); disk filling up between download and swap; Windows Defender or another AV locking zeroclaw.exe mid-swap; binary installed on NFS.

Related errors


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