fix(#2257): auto-resume debug on non-terminal session-manager return (#2300)

The /gsd-debug orchestrator handled the gsd-debug-session-manager return
with only two literal-string checks (DEBUG SESSION COMPLETE, ABANDONED)
and no else branch, so a usable-but-non-terminal progress summary (the
manager's own turn/context budget exhausted mid-loop, with a valid
on-disk checkpoint) fell through to the user as if the debug were
complete. Same gap at the continue subcommand.

Callee side (agents/gsd-debug-session-manager.md): add an explicit
non-terminal CONTINUE_REQUIRED return marker, distinct from the two
terminal shapes and from a genuine user-input checkpoint.

Orchestrator (gsd-core/workflows/debug.md Sections 4 and 1c): classify
returns exhaustively — recognized terminal markers behave as before,
anything else is non-terminal and auto-resumes by re-spawning the
session manager from the same slug/checkpoint. Anti-loop guard: after
two consecutive no-progress resumes (unchanged next_action/updated),
emit a blocker report instead of looping.

Regression test (source-text contract guard, fix-2196 idiom) asserts
both sections' non-terminal/auto-resume branch, the CONTINUE_REQUIRED
marker, and the anti-loop bound.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Tom Boucher
2026-07-15 12:55:38 -04:00
committed by GitHub
parent 9c65a2ea02
commit f74442310d
24 changed files with 215 additions and 42 deletions

View File

@@ -7,7 +7,7 @@
"agents/gsd-code-fixer.md": "1cf3a9fdade9a470",
"agents/gsd-code-reviewer.md": "5342fcc0da974696",
"agents/gsd-codebase-mapper.md": "b995bf01af0193d2",
"agents/gsd-debug-session-manager.md": "a5649998f68812d5",
"agents/gsd-debug-session-manager.md": "a13fdb7f466dd5ff",
"agents/gsd-debugger.md": "a63306f54bdc63bf",
"agents/gsd-doc-classifier.md": "c2bf59af9467810b",
"agents/gsd-doc-synthesizer.md": "b2a179bf3c9bd636",
@@ -282,7 +282,7 @@
"gsd-core/workflows/code-review-fix.md": "2e113d1f4350a075",
"gsd-core/workflows/code-review.md": "334c90c401f291f8",
"gsd-core/workflows/complete-milestone.md": "c1f91b77f4ace7f2",
"gsd-core/workflows/debug.md": "c581e89aa9d9d71e",
"gsd-core/workflows/debug.md": "98c8ed5af882ef8f",
"gsd-core/workflows/diagnose-issues.md": "77d98ac07c4a26ff",
"gsd-core/workflows/discovery-phase.md": "3ba7cfb89fb1e761",
"gsd-core/workflows/discuss-phase-assumptions.md": "f5b765d33eba4f88",