From 2552d101afe46b8622a7695f38f6cd1766dd1afc Mon Sep 17 00:00:00 2001 From: Can Celik Date: Sun, 27 Sep 2026 20:57:00 +0300 Subject: feat: let agents report their own resume command (#4687) * feat: let agents report their own resume command * fix: keep reported resume commands tied to accepted sessions and current owners --- src/cli/spec.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/cli/spec.rs') diff --git a/src/cli/spec.rs b/src/cli/spec.rs index 9465dcc3..1cfc2e7f 100644 --- a/src/cli/spec.rs +++ b/src/cli/spec.rs @@ -646,6 +646,7 @@ fn report_agent_command() -> Command { .arg(option("seq", "N")) .arg(option("agent-session-id", "ID")) .arg(path_option("agent-session-path", "PATH")) + .arg(resume_argv_arg()) } fn report_agent_session_command() -> Command { @@ -658,6 +659,15 @@ fn report_agent_session_command() -> Command { .arg(option("agent-session-id", "ID")) .arg(path_option("agent-session-path", "PATH")) .arg(option("session-start-source", "SOURCE")) + .arg(resume_argv_arg()) +} + +fn resume_argv_arg() -> Arg { + Arg::new("resume_argv") + .value_name("RESUME_ARG") + .num_args(0..) + .last(true) + .help("Command that resumes this session after a Herdr restart; starts with a plain command name") } fn release_agent_command() -> Command { -- cgit v1.2.3