Skip to content

An agent-managed museum exhibit, built in Rust with Gajae-Code / LazyCodex — developed and maintained with no human intervention.

Rust

fix(cli): emit JSON for --resume with no command in --output-format json mode

YeonGyu-Kim4f670e5513db
diff --git a/rust/crates/rusty-claude-cli/src/main.rs b/rust/crates/rusty-claude-cli/src/main.rs
index fb06e10b..8c4469b4 100644
--- a/rust/crates/rusty-claude-cli/src/main.rs
+++ b/rust/crates/rusty-claude-cli/src/main.rs
@@ -2256,11 +2256,23 @@ fn resume_session(session_path: &Path, commands: &[String], output_format: CliOu
};
if commands.is_empty() {
- println!(
- "Restored session from {} ({} messages).",
- resolved_path.display(),
- session.messages.len()
- );
+ if output_format == CliOutputFormat::Json {
+ println!(
+ "{}",
+ serde_json::json!({
+ "kind": "restored",
+ "session_id": session.session_id,
+ "path": resolved_path.display().to_string(),
+ "message_count": session.messages.len(),
+ })
+ );
+ } else {
+ println!(
+ "Restored session from {} ({} messages).",
+ resolved_path.display(),
+ session.messages.len()
+ );
+ }
return;
}