agent-orchestrator/backend
Harshit Singh Bhandari 60b651f20e
fix(session): clear shutdown-saved marker so killed sessions stay dead (#2319) (#2320)
After Cmd+Q quit + reopen, sessions the user killed reappeared as alive.
The session_worktrees "shutdown-saved" restore marker was write-only:
RestoreAll auto-relaunches any terminated session that still has a marker,
but Kill never deleted it and RestoreAll never consumed it. A session that
survived one reopen cycle (gaining a marker via reconcileLive) and was then
killed still carried the marker, so the next boot resurrected it.

Two-layer fix:
- Kill now deletes the marker (best-effort) after MarkTerminated: a user
  kill is explicit terminal intent and must not leave a resurrection marker.
- RestoreAll deletes the marker after consuming preserveRef and attempting
  relaunch, making it one-shot so it never outlives a single restart. A
  still-live session re-acquires a fresh marker at the next quit.

Manual Restore stays marker-independent, so killed sessions remain
restorable on demand, just not auto-resurrected on boot.

Adds DeleteSessionWorktrees to the Manager Store interface (the concrete
store already implements it) and tests covering all three behaviors.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 03:00:09 +05:30
..
cmd refactor: move project manager to service layer (#68) 2026-06-02 01:26:48 +05:30
internal fix(session): clear shutdown-saved marker so killed sessions stay dead (#2319) (#2320) 2026-07-01 03:00:09 +05:30
.golangci.yml feat(agents): agent platform — registry, activity hooks, harness allowlist (#119) 2026-06-07 00:52:40 +05:30
go.mod fix(daemon): stop orchestrator id-increment + OS-native daemon liveness link (#2185) 2026-06-26 18:28:32 +05:30
go.sum fix(daemon): stop orchestrator id-increment + OS-native daemon liveness link (#2185) 2026-06-26 18:28:32 +05:30
main.go feat(backend): add cobra cli foundation 2026-06-01 01:44:43 +05:30
sqlc.yaml feat(review): configurable AO code review backend (V1) (#192) (#197) 2026-06-15 01:17:17 +05:30