{"record":{"id":"58517805ab98e78c","repo":"zeroclaw-labs/zeroclaw","slug":"x-twitter-channel-requires-the-channel-twitter-f","errorCode":null,"errorMessage":"X/Twitter channel requires the `channel-twitter` feature","messagePattern":"X/Twitter channel requires the `channel-twitter` feature","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-channels/src/orchestrator/mod.rs","lineNumber":9558,"sourceCode":"                .channels\n                .twitter\n                .get(\"default\")\n                .context(\"X/Twitter 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(\"twitter\", &alias))\n            };\n            Ok(Arc::new(TwitterChannel::new(\n                tw.bearer_token.clone(),\n                alias,\n                peer_resolver,\n            )))\n        }\n        #[cfg(not(feature = \"channel-twitter\"))]\n        \"twitter\" => {\n            anyhow::bail!(\"X/Twitter channel requires the `channel-twitter` feature\");\n        }\n        #[cfg(feature = \"channel-git\")]\n        \"git\" => {\n            let g = config\n                .channels\n                .git\n                .get(\"default\")\n                .context(\"Git 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(\"git\", &alias))\n            };\n            Ok(Arc::new(GitChannel::new(g.clone(), alias, peer_resolver)?))\n        }\n        #[cfg(not(feature = \"channel-git\"))]\n        \"git\" => {","sourceCodeStart":9540,"sourceCodeEnd":9576,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-channels/src/orchestrator/mod.rs#L9540-L9576","documentation":"Raised by build_channel_by_id when channel_id = \"twitter\" is requested but the binary was compiled without the `channel-twitter` feature. The enabled arm reads config.channels.twitter and wires the channel with alias and peer_resolver; without the feature the arm only bails, naming `channel-twitter`. The message itself uses the legacy name \"X/Twitter\".","triggerScenarios":"start_channels / build_channel_by_id selecting \"twitter\" from an [channels.twitter] block or agent channel binding in a build lacking --features channel-twitter.","commonSituations":"Default-feature builds (twitter is in channels-full only); API-bridge setups where the operator enabled a subset of social channels; prebuilt binaries from before the channel was stabilized.","solutions":["Rebuild with cargo build --release --features channel-twitter","Or use --features channels-full","Or remove [channels.twitter] and \"twitter\" bindings from config","Confirm via zeroclaw_channels::listing::is_channel_type_compiled(\"twitter\")"],"exampleFix":"# before\n cargo build --release\n\n # after\n cargo build --release --features channel-twitter","handlingStrategy":"validation","validationCode":"use zeroclaw_channels::listing::is_channel_type_compiled;\n\nif !is_channel_type_compiled(\"twitter\") {\n    eprintln!(\"rebuild with --features channel-twitter or remove [channels.twitter]\");\n}","typeGuard":"fn twitter_available() -> bool {\n    zeroclaw_channels::listing::is_channel_type_compiled(\"twitter\")\n}","tryCatchPattern":"match build_channel_by_id(&config_arc, \"twitter\") {\n    Ok(ch) => { /* use */ }\n    Err(e) if e.to_string().contains(\"requires the `channel-twitter` feature\") => {\n        // skip; rebuild hint\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Check the compiled listing whenever you add a social channel binding to an existing install","Remember the error message says \"X/Twitter\" — match on the feature name, not the message prefix"],"tags":["rust","cargo-features","feature-gate","zeroclaw","channels","twitter"],"backgroundTag":"cargo-feature-not-enabled","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}