Hmbown/CodeWhale · error
No session selected.
Error message
No session selected.
What it means
When resuming a session interactively, the CLI reads a session id from stdin; if the user presses enter without typing anything, the empty selection aborts with this error instead of launching the TUI with an invalid session.
Solutions
- Type the session id shown in the prompt and press Enter.
- Find a valid session id first (e.g. via the session listing command) and resume non-interactively: `codewhale resume <session-id>`.
- If running non-interactively, pipe the session id: `echo <session-id> | codewhale ...`.
Example fix
null
Defensive patterns
Strategy: validation
Validate before calling
if session_id.trim().is_empty() {
eprintln!("no session id supplied; run 'codewhale resume <session-id>'");
} else {
run_tui_in_process(cli, resolved_runtime, vec!["resume".into(), session_id.trim().into()])?;
} Try / catch
match result {
Err(e) if e.to_string() == "No session selected." => {
eprintln!("selection was empty — pass a session id explicitly");
}
Err(e) => return Err(e),
Ok(()) => {}
} Prevention
- List sessions first and resume by explicit id rather than relying on the interactive prompt.
- In non-interactive contexts, always pipe or pass the session id; stdin may be EOF.
- Trim and validate user input before forwarding it to resume.
When it happens
Trigger: The session-selection prompt read an empty line from stdin (io::stdin().read_line) and `input.trim()` was empty before `run_tui_in_process` is called with `resume <session_id>`.
Common situations: User hit Enter at the selection prompt without typing a session id; stdin was EOF/closed (piped or non-interactive) so read_line returned zero bytes; script driving the CLI omitted the input.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- API key input is unexpectedly large
- API key on stdin exceeds the 8 KiB limit
- `codewhale --continue` resumes the interactive TUI. Use…
- `codewhale --resume ` resumes the interactive TUI. Use…
- --continue/--resume/--session-id apply to the interactive…
AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22).
Data as JSON: /api/errors/8c3a01cfb832ec5a.
Report an issue: GitHub.
Appendix: source
Thrown at crates/cli/src/lib.rs:5296
0
} else {
1
})
}
println!();
println!("Windows note: enter a session id or prefix from the list above.");
println!("You can also run `codewhale resume --last` to skip this prompt.");
print!("Session id/prefix (Enter to cancel): ");
io::stdout().flush()?;
let mut input = String::new();
io::stdin()
.read_line(&mut input)
.context("failed to read session selection")?;
let session_id = input.trim();
if session_id.is_empty() {
bail!("No session selected.");
}
run_tui_in_process(
cli,
resolved_runtime,
vec!["resume".to_string(), session_id.to_string()],
)
}
fn should_pick_resume_in_dispatcher(passthrough: &[String], is_windows: bool) -> bool {
is_windows && passthrough == ["resume"]
}
fn run_tui_in_process(
cli: &Cli,
resolved_runtime: &ResolvedRuntimeOptions,
passthrough: Vec<String>,
) -> Result<()> {View on GitHub (pinned to 73e0f67d83)