Repository navigation
fix(subagents,proactive): unify progression helpers and harden PR #879 race tests - #900
sambitcreate wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Important
noticeRound still accepts a stale pre-pause notice after a same-goal pause/resume, so this race should be fixed before merging.
Reviewed changes the shared subagent lifecycle consolidation, goal-loop race fixes, and the added proactive-execution regression coverage.
- Shared subagent lifecycle centralizes V1/V2 terminal classification, immutable identity, and monotonic progression while preserving the control plane's dedicated stop path.
- Goal-loop races cancel replacement watchdogs and fence notice-round work against cleared, paused, or replaced goals.
- Regression coverage expands behavioral tests for input admission, keep-awake state, webhook capacity refunds, and subagent progression matrices.
@v0 or keep the SHA fresh with Dependabot | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using GPT Sol | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes since the prior Pullfrog review at 2ad6f63b9, the follow-up commit closed both reported gaps.
- Goal revision fence Captured the exact post-
dropLook()goal revision and retained it across successful, empty, and rejected fallback-context outcomes. - Race regression coverage Added a same-goal pause/resume test that proves stale notices neither start rounds nor arm relooks while preserving current post-
dropLook()notices. - Keep-awake assertions Replaced the loose error-count check with exact ordered assertions for idle, start, status, and stop failures.
@v0 or keep the SHA fresh with Dependabot | View workflow run | Using GPT Sol | 𝕏

Summary
renderer/shared/subagent-runs.ts(subagentRunStateProgresses,subagentRunSnapshotProgresses,sameSubagentRunSnapshotIdentity,isSubagentRunStateTerminal), preservingallowStopped: falseinmain/services/subagents/subagent-control-v2.tsmain/services/goal/goal-loop.ts(set()cancelling prior watchdog timer;noticeRound()checking goal replacement across awaits before armingrelookAfterNotice)subagent-runs-v2.test.ts,subagent-control-v2.test.ts,chat-run-input-admission.test.ts,goal-loop.test.ts,keep-awake-core.test.ts, andscheduled-task-triggers.test.tsVerification
npm run type-checktsx --testsuite (275/275 passed)npm --prefix packages/cli run build && npm --prefix packages/cli test(367 passed, 1 skipped)