fix(monitor,resume): honor stopped status + clear stop metadata on resume

Implements user choice Option B: the two follow-ups to 0de0f23, in one patch.

Changes:
- skills/tmux-agent-orchestrate-monitor/scripts/reconcile.sh:
  - drift-A skip-set extended: ('terminated', 'archived', 'stopped')
  - prevents the monitor from overwriting a tmux-dead 'stopped' row with
    'terminated (auto-detected)', which would lose resumable + captured id
- skills/tmux-agent-orchestrate-resume/scripts/update_yaml_resumed.sh:
  - pop stopped_at, stopped_at_epoch, stop_reason, resumable on resume
    (alongside the existing terminated_at*/termination_mode/archived_at) so a
    resumed row has no stale end-of-session metadata
- skills/tmux-agent-orchestrate-monitor/SKILL.md: documented 'stopped' in the
  drift class list + a skip-set note on drift class A
- skills/tmux-agent-orchestrate-resume/SKILL.md: documented stopped -> running
  transition + tier-1 race-free resume path

5-route surface preserved (no new directory). delete_session.sh untouched.

Verified on isolated server -L claude-followup-test (kill-server after):
- syntax PASS
- E2E A: stop -> tmux dead -> reconcile --once -> status stays 'stopped'
- E2E B: resume -> stopped_at/stopped_at_epoch/stop_reason/resumable all gone
- E2E C: plain delete -> terminated, reconcile leaves it (no regression)
- Real YAML + main canary untouched

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-20 15:32:02 +00:00
parent 0de0f236b2
commit a2d4f80608
4 changed files with 32 additions and 2 deletions
@@ -302,7 +302,9 @@ if tmux_confirmed:
name = s.get('name')
if not name:
continue
if s.get('status') in ('terminated', 'archived'):
# 'stopped' 도 deliberate한 종료 상태 — drift 로 보지 않고 그대로 둔다.
# (없으면 tmux-dead stopped 세션을 'terminated' 로 덮어써 resumable 플래그가 소실됨)
if s.get('status') in ('terminated', 'archived', 'stopped'):
continue
srv = s.get('tmux_server') or 'default'
if (name, srv) not in alive_set: