{"record":{"id":"3d9a533e7e352d65","repo":"zeroclaw-labs/zeroclaw","slug":"imessage-channel-requires-the-channel-imessage-f","errorCode":null,"errorMessage":"iMessage channel requires the `channel-imessage` feature","messagePattern":"iMessage channel requires the `channel-imessage` feature","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-channels/src/orchestrator/mod.rs","lineNumber":9619,"sourceCode":"        \"mochat\" => {\n            anyhow::bail!(\"Mochat channel requires the `channel-mochat` feature\");\n        }\n        #[cfg(feature = \"channel-imessage\")]\n        \"imessage\" => {\n            if !config.channels.imessage.contains_key(\"default\") {\n                anyhow::bail!(\"iMessage channel is not configured\");\n            }\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(\"imessage\", &alias))\n            };\n            Ok(Arc::new(IMessageChannel::new(alias, peer_resolver)))\n        }\n        #[cfg(not(feature = \"channel-imessage\"))]\n        \"imessage\" => {\n            anyhow::bail!(\"iMessage channel requires the `channel-imessage` feature\");\n        }\n        \"line\" => {\n            #[cfg(feature = \"channel-line\")]\n            {\n                let ln = config\n                    .channels\n                    .line\n                    .get(\"default\")\n                    .context(\"LINE 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(\"line\", &alias))\n                };\n                let sender_name_resolver: Arc<dyn Fn() -> Option<String> + Send + Sync> = {\n                    let cfg_arc = config_arc.clone();\n                    let alias = alias.clone();","sourceCodeStart":9601,"sourceCodeEnd":9637,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-channels/src/orchestrator/mod.rs#L9601-L9637","documentation":"Raised by build_channel_by_id when channel_id = \"imessage\" is requested and the binary was compiled without the `channel-imessage` feature. The feature-on arm (which would check for the \"default\" config entry and build IMessageChannel) is cfg'd out; only the bail remains. iMessage is a cfg-gate-only feature (no optional deps), so enabling it is cheap.","triggerScenarios":"start_channels / build_channel_by_id selecting \"imessage\" from an agent binding or channels config in a build without --features channel-imessage.","commonSituations":"Default-feature builds (imessage is in channels-full only); macOS hosts where the operator assumed iMessage ships by default; slim binaries built for Linux servers that later get an imessage binding in shared config.","solutions":["Rebuild with cargo build --release --features channel-imessage","Or use --features channels-full","Or remove the \"imessage\" binding / channel config","After rebuilding, ensure [channels.imessage.default] exists or you will next hit \"iMessage channel is not configured\""],"exampleFix":"# before\n cargo build --release\n\n # after\n cargo build --release --features channel-imessage","handlingStrategy":"validation","validationCode":"use zeroclaw_channels::listing::is_channel_type_compiled;\n\nif !is_channel_type_compiled(\"imessage\") {\n    eprintln!(\"rebuild with --features channel-imessage or remove the imessage binding\");\n}","typeGuard":"fn imessage_available() -> bool {\n    zeroclaw_channels::listing::is_channel_type_compiled(\"imessage\")\n}","tryCatchPattern":"match build_channel_by_id(&config_arc, \"imessage\") {\n    Ok(ch) => { /* use */ }\n    Err(e) if e.to_string().contains(\"requires the `channel-imessage` feature\") => {\n        // rebuild needed; config changes will not help\n    }\n    Err(e) if e.to_string() == \"iMessage channel is not configured\" => {\n        // different error: compiled in, add [channels.imessage.default]\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Two distinct imessage failures share this arm: feature missing vs default config missing — check the message before acting","channel-imessage is dependency-free, so including it in standard build profiles costs nothing"],"tags":["rust","cargo-features","feature-gate","zeroclaw","channels","imessage"],"backgroundTag":"cargo-feature-not-enabled","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}