{"record":{"id":"78db82a80609784b","repo":"Hmbown/CodeWhale","slug":"codewhale-continue-resumes-the-interactive-tui","errorCode":null,"errorMessage":"`codewhale --continue` resumes the interactive TUI. Use `codewhale exec --continue <PROMPT>` to continue a session non-interactively.","messagePattern":"`codewhale --continue` resumes the interactive TUI\\. Use `codewhale exec --continue <PROMPT>` to continue a session non-interactively\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/cli/src/lib.rs","lineNumber":2363,"sourceCode":"    if let Some(session_id) = resume_session_id {\n        forwarded.push(\"--resume\".to_string());\n        forwarded.push(session_id.to_string());\n    }\n\n    let prompt =\n        cli.prompt_flag\n            .iter()\n            .chain(cli.prompt.iter())\n            .fold(String::new(), |mut acc, part| {\n                if !acc.is_empty() {\n                    acc.push(' ');\n                }\n                acc.push_str(part);\n                acc\n            });\n    if !prompt.is_empty() {\n        if cli.continue_session {\n            bail!(\n                \"`codewhale --continue` resumes the interactive TUI. Use `codewhale exec --continue <PROMPT>` to continue a session non-interactively.\"\n            );\n        }\n        if let Some(session_id) = resume_session_id {\n            bail!(\n                \"`codewhale --resume {session_id}` resumes the interactive TUI. Use `codewhale exec --resume {session_id} <PROMPT>` to continue a session non-interactively.\"\n            );\n        }\n        forwarded.push(\"--prompt\".to_string());\n        forwarded.push(prompt);\n    }\n\n    Ok(forwarded)\n}\n\nfn resolve_runtime_for_dispatch(\n    store: &mut ConfigStore,\n    runtime_overrides: &CliRuntimeOverrides,","sourceCodeStart":2345,"sourceCodeEnd":2381,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/cli/src/lib.rs#L2345-L2381","documentation":"When a non-empty positional prompt is supplied at the top level (which the CLI treats as an exec-style forwarding invocation) combined with `--continue`, the dispatcher bails: `--continue` resumes the interactive TUI and cannot also serve a one-shot prompt. The message directs users to `codewhale exec --continue <PROMPT>` for non-interactive continuation.","triggerScenarios":"Running `codewhale --continue \"<prompt text>\"` — global `--continue` plus a bare prompt argument (non-empty after the CLI's prompt-joining logic).","commonSituations":"Users mapping `--continue` onto exec-style usage from other CLI tools, or scripts appending a prompt to an interactive-resume command.","solutions":["Use `codewhale exec --continue \"<prompt>\"` to continue the latest session non-interactively.","Drop the prompt if you actually want the interactive TUI: plain `codewhale --continue`.","Update wrapper scripts to route prompt-bearing continuations through the `exec` subcommand."],"exampleFix":"// before\ncodewhale --continue \"finish the refactor\"\n// error: `codewhale --continue` resumes the interactive TUI...\n\n// after\ncodewhale exec --continue \"finish the refactor\"","handlingStrategy":"validation","validationCode":"# wrapper guard: prompt + --continue must go through exec\nif [[ \"$*\" == *--continue* && $# -gt 1 ]]; then\n  exec codewhale exec --continue \"$*\" # route appropriately\nfi","typeGuard":null,"tryCatchPattern":"match run(args) {\n    Err(e) if e.to_string().contains(\"resumes the interactive TUI. Use `codewhale exec --continue\") => {\n        eprintln!(\"route prompt continuations through `codewhale exec --continue <PROMPT>`\");\n    }\n    r => r?,\n}","preventionTips":["Remember: --continue without a prompt = TUI; with a prompt = use exec --continue.","Keep one canonical wrapper that already routes correctly.","Never append prompts to interactive-resume invocations."],"tags":["cli","session","flags","tui"],"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"}