From 2221dd4f0feaff652a82192fca9daea4353f513e Mon Sep 17 00:00:00 2001 From: bellman Date: Fri, 15 May 2026 11:12:10 +0900 Subject: [PATCH] omx(team): auto-checkpoint worker-1 [1] --- rust/crates/rusty-claude-cli/src/main.rs | 34 ++++++++++++++++++++---- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/rust/crates/rusty-claude-cli/src/main.rs b/rust/crates/rusty-claude-cli/src/main.rs index c90f45ac..f9579b02 100644 --- a/rust/crates/rusty-claude-cli/src/main.rs +++ b/rust/crates/rusty-claude-cli/src/main.rs @@ -4121,12 +4121,35 @@ fn run_resume_command( }) } SlashCommand::Unknown(name) => Err(format_unknown_slash_command(name).into()), - // /session list/exists/delete can be served from the managed sessions directory - // in resume mode without starting an interactive REPL. Mutating delete remains - // opt-in through /session delete --force so JSON callers never hang on a prompt. - SlashCommand::Session { action, target } => { - run_resumed_session_command(session_path, session, action.as_deref(), target.as_deref()) + SlashCommand::Session { + action: Some(ref act), + target: Some(ref target), + } if act == "exists" => { + let exists = session_reference_exists(target).unwrap_or(false); + let resolved = resolve_session_reference(target).ok(); + Ok(ResumeCommandOutcome { + session: session.clone(), + message: Some(format!( + "Session exists\n Session {target}\n Exists {exists}{}", + resolved + .as_ref() + .map(|handle| format!("\n File {}", handle.path.display())) + .unwrap_or_default() + )), + json: Some(serde_json::json!({ + "kind": "session_exists", + "session": target, + "exists": exists, + "path": resolved.map(|handle| handle.path.display().to_string()), + })), + }) } + // /session list can be served from the sessions directory without a live session. + SlashCommand::Session { action: None, .. } => session_list_outcome(), + SlashCommand::Session { + action: Some(ref act), + .. + } if act == "list" => session_list_outcome(), SlashCommand::Bughunter { .. } | SlashCommand::Commit { .. } | SlashCommand::Pr { .. } @@ -4147,6 +4170,7 @@ fn run_resume_command( | SlashCommand::Fast | SlashCommand::Exit | SlashCommand::Summary + | SlashCommand::Session { .. } | SlashCommand::Desktop | SlashCommand::Brief | SlashCommand::Advisor