{"record":{"id":"8c3a01cfb832ec5a","repo":"Hmbown/CodeWhale","slug":"no-session-selected","errorCode":null,"errorMessage":"No session selected.","messagePattern":"No session selected\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"info","filePath":"crates/cli/src/lib.rs","lineNumber":4673,"sourceCode":"            0\n        } else {\n            1\n        })\n    }\n\n    println!();\n    println!(\"Windows note: enter a session id or prefix from the list above.\");\n    println!(\"You can also run `codewhale resume --last` to skip this prompt.\");\n    print!(\"Session id/prefix (Enter to cancel): \");\n    io::stdout().flush()?;\n\n    let mut input = String::new();\n    io::stdin()\n        .read_line(&mut input)\n        .context(\"failed to read session selection\")?;\n    let session_id = input.trim();\n    if session_id.is_empty() {\n        bail!(\"No session selected.\");\n    }\n\n    run_tui_in_process(\n        cli,\n        resolved_runtime,\n        vec![\"resume\".to_string(), session_id.to_string()],\n    )\n}\n\nfn should_pick_resume_in_dispatcher(passthrough: &[String], is_windows: bool) -> bool {\n    is_windows && passthrough == [\"resume\"]\n}\n\nfn run_tui_in_process(\n    cli: &Cli,\n    resolved_runtime: &ResolvedRuntimeOptions,\n    passthrough: Vec<String>,\n) -> Result<()> {","sourceCodeStart":4655,"sourceCodeEnd":4691,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/cli/src/lib.rs#L4655-L4691","documentation":"On Windows, bare `codewhale resume` cannot show a fuzzy picker, so it lists sessions and prompts `Session id/prefix (Enter to cancel):`. Reading the line with `read_line` succeeds even for empty input, so an empty trimmed answer — the documented cancel gesture — surfaces as this bail. The session id or a unique prefix is required to proceed, or `--last` skips the prompt.","triggerScenarios":"Running `codewhale resume` on Windows and pressing Enter at the selection prompt; typing only whitespace; stdin closed/EOF so the read returns an empty line.","commonSituations":"Users testing the prompt and pressing Enter to 'skip'; terminal paste issues; scripts calling `codewhale resume` non-interactively on Windows where stdin yields EOF.","solutions":["Type a session id or a unique prefix from the printed list and press Enter","Skip the prompt entirely: `codewhale resume --last`","For scripts, pass the session explicitly: `codewhale resume <session-id>`"],"exampleFix":"# before\nSession id/prefix (Enter to cancel): <Enter>\n# No session selected.\n\n# after\n$ codewhale resume --last","handlingStrategy":"validation","validationCode":"#!/usr/bin/env bash\n# on Windows or in scripts, never rely on the picker prompt\nif [ -n \"${SESSION_ID:-}\" ]; then\n  exec codewhale resume \"$SESSION_ID\"\nelse\n  exec codewhale resume --last\nfi","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use `codewhale resume --last` or `codewhale resume <id>` to bypass the prompt","Feed a session id or prefix from the listed sessions; Enter is always a cancel"],"tags":["resume","windows","interactive-prompt","session","cli"],"backgroundTag":"empty-user-input","analyzedSha":"0c42157ee52f9d55af2b506d71b46249910f77d3","analyzedAt":"2026-08-20T21:50:45.477Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}