0de0f236b2a41c44bd1b8fe84a5d3fd3171097aa
Implements user choice Option A: extend delete instead of adding a 6th 'stop' skill.
Changes:
- skills/lib.sh:
- capture_conversation_id() — thin wrapper over find_workspace_uuid (race-free)
- is_already_stopped() — idempotency check
- _validate(): add 'stopped' to the valid status set (required for the new
transition; without it atomic_dump_yaml silently rejected the write)
- skills/tmux-agent-orchestrate-delete/scripts/delete_session.sh:
- --capture-id: records claude_session_id_own / agy_conversation_id_own +
resumable:true to the row before kill (guarantees tier-1 resume)
- --reason <reason>: records stop_reason (default manual_stop)
- --graceful: send-keys exit -> 3s -> kill-session(SIGTERM) -> 5s -> SIGKILL
- STOP mode (any of the three) transitions running -> stopped (vs terminated)
- Idempotency: already-stopped session prints message + exit 0
- No options -> identical legacy behaviour (hard->terminated, soft->archived)
- skills/tmux-agent-orchestrate-delete/SKILL.md: documented options + state machine
5-route surface preserved (no new directory). Other 5 routes unchanged.
Known follow-up (out of scope, monitor edits forbidden this round): monitor
reconcile drift-A treats a tmux-dead 'stopped' row as drift and would re-mark it
'terminated' (skip-set is only terminated/archived). status.sh shows DRIFT=A for
stopped rows. Needs a Phase-2 wiring change to add 'stopped' to the skip-set.
Verified on isolated server -L claude-stop-impl-test (kill-server after):
- syntax PASS; E2E: capture-id, idempotency(exit 0), graceful fallback chain,
backward-compat(terminated), status renders stopped. Real YAML + main canary untouched.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Description
No description provided
Languages
Shell
69.9%
Python
30.1%