From 8f1f65dd989c647e7daaf73716035b7527ee6a4f Mon Sep 17 00:00:00 2001 From: Yeachan-Heo Date: Thu, 2 Apr 2026 08:40:34 +0000 Subject: [PATCH] Preserve explicit resume paths while parsing slash command arguments The release-harness merge taught --resume to keep multi-token slash commands together, but that also misclassified absolute session paths as slash commands. This follow-up keeps the latest-session shortcut for real slash commands while still treating absolute and relative filesystem paths as explicit resume targets, which restores the new integration test and the intended resume flow. Constraint: --resume must accept both implicit latest-session shortcuts and absolute filesystem paths Rejected: Require --resume latest for all slash-command-only invocations | breaks the new shortcut UX merged from 9103/9202 Confidence: high Scope-risk: narrow Directive: Distinguish slash commands with looks_like_slash_command_token before assuming a leading slash means latest-session shorthand Tested: cargo build -p rusty-claude-cli; cargo test -p rusty-claude-cli Not-tested: Non-UTF8 session path handling --- rust/crates/rusty-claude-cli/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/crates/rusty-claude-cli/src/main.rs b/rust/crates/rusty-claude-cli/src/main.rs index 62e9dfb..cac0ac2 100644 --- a/rust/crates/rusty-claude-cli/src/main.rs +++ b/rust/crates/rusty-claude-cli/src/main.rs @@ -637,7 +637,7 @@ fn parse_system_prompt_args(args: &[String]) -> Result { fn parse_resume_args(args: &[String]) -> Result { let (session_path, command_tokens): (PathBuf, &[String]) = match args.first() { None => (PathBuf::from(LATEST_SESSION_REFERENCE), &[]), - Some(first) if first.trim_start().starts_with('/') => { + Some(first) if looks_like_slash_command_token(first) => { (PathBuf::from(LATEST_SESSION_REFERENCE), args) } Some(first) => (PathBuf::from(first), &args[1..]),