fix: handle --help after --resume flag

Added specific handler for --help when rest contains --resume, so
claw --resume --help shows resume help instead of consuming --help
as a session-id literal.

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
This commit is contained in:
bellman
2026-06-05 01:18:55 +09:00
parent 6757ebde74
commit a671969688
2 changed files with 6 additions and 1 deletions

View File

@@ -1646,6 +1646,11 @@ fn parse_args(args: &[String]) -> Result<CliAction, String> {
rest.push("--resume".to_string());
index += 1;
}
// #457: --help after --resume should show resume help, not be consumed as session-id
"--help" | "-h" if rest.first().map(String::as_str) == Some("--resume") => {
wants_help = true;
index += 1;
}
flag if rest.is_empty() && flag.starts_with("--resume=") => {
rest.push("--resume".to_string());
rest.push(flag[9..].to_string());