{"record":{"id":"8a2fb30d3f79beb6","repo":"zeroclaw-labs/zeroclaw","slug":"telegram-channel-requires-the-channel-telegram-f","errorCode":null,"errorMessage":"Telegram channel requires the `channel-telegram` feature","messagePattern":"Telegram channel requires the `channel-telegram` feature","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-channels/src/orchestrator/mod.rs","lineNumber":8936,"sourceCode":"                    tg.bot_token.clone(),\n                    alias.clone(),\n                    peer_resolver,\n                    tg.mention_only,\n                )\n                .with_voice_peer_resolver(voice_peer_resolver)\n                .with_persistence(config_arc.clone())\n                .with_api_base(tg.api_base_url.clone())\n                .with_ack_reactions(ack)\n                .with_streaming(tg.stream_mode, tg.draft_update_interval_ms)\n                .with_transcription(config.transcription.clone())\n                .with_tts(&config)\n                .with_workspace_dir(workspace_dir)\n                .with_approval_timeout_secs(tg.approval_timeout_secs),\n            ))\n        }\n        #[cfg(not(feature = \"channel-telegram\"))]\n        \"telegram\" => {\n            anyhow::bail!(\"Telegram channel requires the `channel-telegram` feature\");\n        }\n        #[cfg(feature = \"channel-discord\")]\n        \"discord\" => {\n            let dc = config\n                .channels\n                .discord\n                .get(\"default\")\n                .context(\"Discord channel is not configured\")?;\n            let alias = \"default\".to_string();\n            let peer_resolver: Arc<dyn Fn() -> Vec<String> + Send + Sync> = {\n                let cfg_arc = config_arc.clone();\n                let alias = alias.clone();\n                Arc::new(move || cfg_arc.read().channel_external_peers(\"discord\", &alias))\n            };\n            let workspace_dir = one_shot_channel_workspace_dir(&config, \"discord\", &alias);\n            Ok(Arc::new(\n                DiscordChannel::new(\n                    dc.bot_token.clone(),","sourceCodeStart":8918,"sourceCodeEnd":8954,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-channels/src/orchestrator/mod.rs#L8918-L8954","documentation":"Thrown by build_channel_by_id when channel_type is `telegram` but the crate was compiled without the `channel-telegram` cargo feature. Feature-gated match arms mean the Telegram client code is not in the binary at all, so constructing the channel runtime is impossible; the bail names the missing feature explicitly.","triggerScenarios":"Config contains a `[channels.telegram.*]` section (or a gateway/one-shot send targets telegram.*) and the zeroclaw-channels crate was built with default features or a feature set omitting `channel-telegram`. Hits both daemon startup channel construction and the one-shot delivery path's build_channel_by_id call.","commonSituations":"Distro or docker image built with a minimal feature set to shrink the binary; feature flags changed in Cargo.toml during an upgrade; local build with `--no-default-features` while the config was written against a full-featured release build.","solutions":["Rebuild with the feature enabled: `cargo build --features channel-telegram` (or add it to the zeroclaw-channels features list in your workspace build)","Check how your binary was produced — distro packages/docker images document which channel features they enable; pick a build that includes telegram","Or remove/disable the `[channels.telegram]` sections so startup no longer tries to construct the channel"],"exampleFix":"# before\ncargo build --no-default-features\n# error: Telegram channel requires the `channel-telegram` feature\n\n# after\ncargo build --no-default-features --features channel-telegram","handlingStrategy":"validation","validationCode":"// At startup, check config channel types against the compiled feature set:\n#[cfg(not(feature = \"channel-telegram\"))]\nif !config.channels.telegram.is_empty() {\n    log::warn!(\"[channels.telegram.*] configured but `channel-telegram` feature is off; channel will fail\");\n}","typeGuard":"fn channel_feature_enabled(channel_type: &str) -> bool {\n    match channel_type {\n        \"telegram\" => cfg!(feature = \"channel-telegram\"),\n        \"discord\" => cfg!(feature = \"channel-discord\"),\n        \"slack\" => cfg!(feature = \"channel-slack\"),\n        \"mattermost\" => cfg!(feature = \"channel-mattermost\"),\n        \"signal\" => cfg!(feature = \"channel-signal\"),\n        \"matrix\" => cfg!(feature = \"channel-matrix\"),\n        \"whatsapp\" | \"whatsapp-web\" => cfg!(feature = \"whatsapp-web\"),\n        _ => false,\n    }\n}","tryCatchPattern":"Err(err) if err.to_string().contains(\"requires the `channel-telegram` feature\") => {\n    // report build/config mismatch: rebuild with the feature or drop the channel section\n}","preventionTips":["Derive the cargo feature list from the channel types present in config at build time","Assert feature/channel consistency in a pre-deploy config check","Document which features each docker/distro build enables"],"tags":["feature-flag","telegram","build-configuration","zeroclaw"],"backgroundTag":"missing-compile-time-feature","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}