Add per-preset resume_command to the config schema #165

Closed
opened 2026-09-03 23:05:34 +01:00 by naps62-yolo · 0 comments
Collaborator

A resumed session has to re-enter its agent's conversation, not start a fresh one, and the flag that does it differs per tool. Hardcoding Claude Code's spelling in the daemon would leave every other preset unresumable.

Add an optional resume_command to spawn presets in ~/.config/maestro/config.toml:

{ id = "claude", command = "claude --dangerously-skip-permissions",
  resume_command = "claude --dangerously-skip-permissions --resume {agent_session}" }

{agent_session} expands to the session's stored agent_session_id. When that is empty the daemon substitutes the preset's fallback (--continue for Claude Code, which resumes the most recent conversation in the working directory). A preset with no resume_command — zsh, bash — resumes by re-running command verbatim, which is the correct behaviour for a plain shell.

Sessions spawned with a custom command rather than a preset fall back to re-running that command.

A resumed session has to re-enter its agent's conversation, not start a fresh one, and the flag that does it differs per tool. Hardcoding Claude Code's spelling in the daemon would leave every other preset unresumable. Add an optional `resume_command` to spawn presets in `~/.config/maestro/config.toml`: ```toml { id = "claude", command = "claude --dangerously-skip-permissions", resume_command = "claude --dangerously-skip-permissions --resume {agent_session}" } ``` `{agent_session}` expands to the session's stored `agent_session_id`. When that is empty the daemon substitutes the preset's fallback (`--continue` for Claude Code, which resumes the most recent conversation in the working directory). A preset with no `resume_command` — `zsh`, `bash` — resumes by re-running `command` verbatim, which is the correct behaviour for a plain shell. Sessions spawned with a custom command rather than a preset fall back to re-running that command.
naps62-yolo added this to the Reboot resilience milestone 2026-09-03 23:05:34 +01:00
naps62-yolo added the difficulty/mediumarea/configtype/feat labels 2026-09-03 23:05:34 +01:00
naps62-yolo added a new dependency 2026-09-03 23:06:14 +01:00
This repo is archived. You cannot comment on issues.
1 Participants
Due Date
No due date set.
Reference: naps62/maestro#165