{"record":{"id":"ffb78eb39ba20ff8","repo":"Hmbown/CodeWhale","slug":"web-is-mutually-exclusive-with-http-and-mobi","errorCode":null,"errorMessage":"--web is mutually exclusive with --http and --mobile","messagePattern":"--web is mutually exclusive with --http and --mobile","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/lib.rs","lineNumber":1404,"sourceCode":"\nfn resolve_serve_bind_host(_mobile: bool, host: Option<String>) -> ServeBindHost {\n    ServeBindHost {\n        host: host.unwrap_or_else(|| \"127.0.0.1\".to_string()),\n    }\n}\n\nfn validate_serve_mode_selection(\n    mcp: bool,\n    http: bool,\n    mobile: bool,\n    web: bool,\n    acp: bool,\n) -> Result<bool> {\n    if http && mobile {\n        bail!(\"--http and --mobile are mutually exclusive; choose one\");\n    }\n    if web && (http || mobile) {\n        bail!(\"--web is mutually exclusive with --http and --mobile\");\n    }\n    let http_selected = http || mobile || web;\n    let selected_modes = [mcp, http_selected, acp]\n        .into_iter()\n        .filter(|selected| *selected)\n        .count();\n    if selected_modes != 1 {\n        bail!(\"Choose exactly one server mode: --mcp, --http/--mobile/--web, or --acp\");\n    }\n    Ok(http_selected)\n}\n\n#[derive(Subcommand, Debug, Clone)]\nenum McpCommand {\n    /// List configured MCP servers\n    List,\n    /// Create a template MCP config at the configured path\n    Init {","sourceCodeStart":1386,"sourceCodeEnd":1422,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/lib.rs#L1386-L1422","documentation":"validate_serve_mode_selection: --web was combined with --http or --mobile; the web serve mode replaces rather than composes with those listeners, so the combination is rejected during CLI validation before any server starts.","triggerScenarios":"Invoking a serve/server subcommand with `--web` alongside `--http` or `--mobile` (e.g. `codewhale serve --web --http`).","commonSituations":"Wanting both the web UI and raw HTTP endpoint at once in one process; scripted flag accumulation; outdated docs or muscle memory from other tools.","solutions":["Choose only --web, or only --http/--mobile, per invocation","Run two separate codewhale serve processes if both surfaces are genuinely needed","Use --web alone if the web interface was the goal"],"exampleFix":"// before\ncodewhale serve --web --http\n// after\ncodewhale serve --web","handlingStrategy":"validation","validationCode":"if web && (http || mobile) { eprintln!(\"--web cannot be combined\"); std::process::exit(2); }","typeGuard":null,"tryCatchPattern":"match result { Err(e) if e.to_string().contains(\"--web is mutually exclusive\") => { eprintln!(\"{}\", e); std::process::exit(2); }, other => other? }","preventionTips":["Pick one server surface per process; spawn separate processes for more","Keep flag sets in scripts minimal and generated from a single selection","Check help output before combining serve flags"],"tags":["cli","flags","server"],"backgroundTag":"mutually-exclusive-flags","analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}