zeroclaw-labs/zeroclaw · error · anyhow::Error
IRC channel requires the `channel-irc` feature
Error message
IRC channel requires the `channel-irc` feature
What it means
Raised by build_channel_by_id when channel_id = "irc" is requested but the binary lacks the `channel-irc` feature. The enabled arm reads config.channels.irc (verify_tls defaults to true, mention_only passthrough); without the feature only the bail arm is compiled. Note channel-twitch depends on channel-irc, so any twitch-enabled build also has IRC compiled in.
Source
Thrown at crates/zeroclaw-channels/src/orchestrator/mod.rs:9509
};
Ok(Arc::new(IrcChannel::new(crate::irc::IrcChannelConfig {
server: irc_cfg.server.clone(),
port: irc_cfg.port,
nickname: irc_cfg.nickname.clone(),
username: irc_cfg.username.clone(),
channels: irc_cfg.channels.clone(),
alias,
peer_resolver,
server_password: irc_cfg.server_password.clone(),
nickserv_password: irc_cfg.nickserv_password.clone(),
sasl_password: irc_cfg.sasl_password.clone(),
verify_tls: irc_cfg.verify_tls.unwrap_or(true),
mention_only: irc_cfg.mention_only,
})))
}
#[cfg(not(feature = "channel-irc"))]
"irc" => {
anyhow::bail!("IRC channel requires the `channel-irc` feature");
}
#[cfg(feature = "channel-twitch")]
"twitch" => {
let tw_cfg = config
.channels
.twitch
.get("default")
.context("Twitch channel is not configured")?;
let alias = "default".to_string();
let peer_resolver: Arc<dyn Fn() -> Vec<String> + Send + Sync> = {
let cfg_arc = config_arc.clone();
let alias = alias.clone();
Arc::new(move || cfg_arc.read().channel_external_peers("twitch", &alias))
};
Ok(Arc::new(TwitchChannel::new(
tw_cfg.bot_username.clone(),
tw_cfg.oauth_token.clone(),
tw_cfg.channels.clone(),View on GitHub (pinned to 88bb9c8533)
Solutions
- Rebuild with cargo build --release --features channel-irc
- Or use --features channels-full
- Or remove [channels.irc] and "irc" bindings from config
- Check zeroclaw_channels::listing::is_channel_type_compiled("irc") before startup
Example fix
# before cargo build --release # after cargo build --release --features channel-irc
Defensive patterns
Strategy: validation
Validate before calling
use zeroclaw_channels::listing::is_channel_type_compiled;
if !is_channel_type_compiled("irc") {
eprintln!("rebuild with --features channel-irc or remove [channels.irc]");
} Type guard
fn irc_available() -> bool {
zeroclaw_channels::listing::is_channel_type_compiled("irc")
} Try / catch
match build_channel_by_id(&config_arc, "irc") {
Ok(ch) => { /* use */ }
Err(e) if e.to_string().contains("requires the `channel-irc` feature") => {
// skip; rebuild hint
}
Err(e) => return Err(e),
} Prevention
- Note the dependency direction: channel-twitch implies channel-irc, never the reverse
- Use the compiled-channel listing after any feature-list change
When it happens
Trigger: start_channels / build_channel_by_id selecting "irc" from an [channels.irc] block or agent binding in a build without --features channel-irc.
Common situations: Default-feature builds (irc is in channels-full only); slim daemon builds where IRC was excluded to trim the dependency footprint; configs carried over from a full build.
Related errors
- QQ channel requires the `channel-qq` feature
- Lark channel requires the `channel-lark` feature
- DingTalk channel requires the `channel-dingtalk` feature
- WeCom channel requires the `channel-wecom` feature
- WeCom WebSocket channel requires the `channel-wecom-ws` feat
AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23).
Data as JSON: /api/errors/b626d8b4ed9450aa.
Report an issue: GitHub.