zeroclaw-labs/zeroclaw · error · anyhow::Error
unsupported room visibility '{other}': expected private or p
Error message
unsupported room visibility '{other}': expected private or public What it means
The `channels add` subcommand (ChannelCommands::Add arm in handle_command, src/channels/mod.rs:74) is intentionally not implemented and unconditionally bails with remediation text. Channel configuration lives in TOML under `channels.<type>.<alias>.<field>`, so adding a channel is done through `zeroclaw config set` or by editing the config file directly. No partial work happens; the command exits non-zero immediately.
Source
Thrown at crates/zeroclaw-api/src/channel.rs:449
}
}
}
impl fmt::Display for RoomVisibility {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str(self.as_str())
}
}
impl FromStr for RoomVisibility {
type Err = anyhow::Error;
fn from_str(value: &str) -> Result<Self, Self::Err> {
match value.trim().to_ascii_lowercase().as_str() {
"private" => Ok(Self::Private),
"public" => Ok(Self::Public),
other => {
anyhow::bail!("unsupported room visibility '{other}': expected private or public")
}
}
}
}
/// Room creation options shared by channel implementations that support
/// creating group conversations.
#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
pub struct RoomCreationOptions {
pub name: Option<String>,
pub topic: Option<String>,
pub invites: Vec<String>,
pub visibility: Option<RoomVisibility>,
pub encryption: Option<bool>,
}
impl SendMessage {
/// Create a new message with content and recipientView on GitHub (pinned to 88bb9c8533)
Solutions
- Use the command the error prints: `zeroclaw config set channels.<channel_type>.<alias>.<field>=<value>` (e.g. channels.telegram.main.token=...)
- Or edit ~/.zeroclaw/config.toml directly and add the `[channels.<type>.<alias>]` table
- Verify with `zeroclaw channels list` that the channel now shows as configured (✅) and compiled in
Example fix
# before $ zeroclaw channels add telegram Error: Channel type 'telegram' — use `zeroclaw config set channels.telegram.<alias>.<field>=<value>` to configure # after $ zeroclaw config set channels.telegram.main.token=123456:ABC-DEF... $ zeroclaw channels list
Defensive patterns
Strategy: validation
Validate before calling
// Reject unimplemented subcommands before dispatching to handle_command.
fn is_implemented(cmd: &zeroclaw::ChannelCommands) -> bool {
!matches!(cmd, zeroclaw::ChannelCommands::Add { .. })
} Try / catch
if let Err(e) = channels::handle_command(cmd, &config).await {
if e.to_string().contains("use `zeroclaw config set channels.") {
// Deterministic unsupported-command bail: do not retry;
// translate into the config-set workflow for the user.
}
} Prevention
- Script channel provisioning with `zeroclaw config set channels.<type>.<alias>.<field>=<value>`, never `channels add`
- Check `zeroclaw channels list` after config changes to confirm the channel compiled in
- Do not build tooling that retries on this error — it is a permanent, by-design refusal
When it happens
Trigger: Invoking `zeroclaw channels add <channel_type> ...` from the CLI, or dispatching a ChannelCommands::Add value into channels::handle_command programmatically. Every invocation of this arm bails — there is no input that succeeds.
Common situations: Muscle memory from other tools that have `add`/`remove` channel subcommands (docker, slackctl); following an out-of-date tutorial or README that predates the config-set workflow.
Related errors
- channel '{}' does not support forge API requests
- runtime.kind='cloudflare' is not implemented yet. Use runtim
- memory backend 'none' disables persistence; choose sqlite, l
- no model configured for agent {agent_alias}: [providers.mode
- Local JWKS token validation is not yet implemented. Set toke
AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23).
Data as JSON: /api/errors/e38073d7df46d923.
Report an issue: GitHub.