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": "3622ae5d90fb15f6",
"agents/gsd-code-reviewer.md": "2249774416314c57",
"agents/gsd-codebase-mapper.md": "948612acd505e87f",
"agents/gsd-debug-session-manager.md": "0a0483c6470df4d1",
"agents/gsd-debug-session-manager.md": "373b4c83cc19595d",
"agents/gsd-debugger.md": "a83427bd5a0406fc",
"agents/gsd-doc-classifier.md": "fb776cfbb7e991b0",
"agents/gsd-doc-synthesizer.md": "2389f388d291c2eb",
@@ -282,7 +282,7 @@
"gsd-core/workflows/code-review-fix.md": "adb9388bb157610c",
"gsd-core/workflows/code-review.md": "ae6bcbd1575aeec4",
"gsd-core/workflows/complete-milestone.md": "614299b2c08e66c3",
"gsd-core/workflows/debug.md": "437b47e14eba8786",
"gsd-core/workflows/debug.md": "161be2a77ffce47a",
"gsd-core/workflows/diagnose-issues.md": "2971c699d52f1b85",
"gsd-core/workflows/discovery-phase.md": "724408336596c50c",
"gsd-core/workflows/discuss-phase-assumptions.md": "92e43cd12200c610",