Repository navigation
fix(prime): restore follow-up input after stopping subagents - #606
Merged
Merged
Conversation
…nts stop When a user interrupts Prime Agent while subagents are running: 1. Settle correlated turns as cancelled when cancellation was requested or prompt lifecycle cancellation returned too_late with a terminal phase, preventing the false "Prime Agent finished without sending a final response" warning. 2. Rearm the background RLM quiescence watch when active turns settle, subagents transition to terminal states (done/error/cancelled), compaction completes, or a resync occurs while input admission is busy. This allows the headless completion barrier to execute and clear nativeRunObservedActive / inputAdmissionBusy instead of rejecting subsequent turns with "Prime Agent background work is still running". 3. Resume daemon queue admission (resumeAfterAbort) on correlated prompt submissions following an abort. Includes regression test verifying interruption during active subagents, cancelled turn settlement, background quiescence completion, and successful admission of follow-up input.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
This was referenced Sep 17, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stopping a Prime Agent turn with active subagents could leave later messages rejected with “Prime Agent background work is still running,” even after the subagents stopped. The native busy flag waited for descendant completion confirmation that was not restarted after turn settlement or terminal background events. Correlated prompts also missed resuming the input queue after abort.
Re-arm the completion wait after busy turn settlement, child updates, idle compaction completion, and busy session resync. Resume the native queue before the next correlated prompt. Preserve authoritative terminal results and existing busy/recovery checks.
Validation: 523 tests passed across PrimeAgentDaemonAdapter.test.ts and PrimeAgentDaemonSessionRuntime.test.ts; server typecheck; scoped lint and formatting. Regression coverage verifies pending background work still blocks conflicting input, terminal events replace the completion wait, follow-up input succeeds after completion, and failed queue resume prevents prompt submission. No live provider/UI reproduction was run. This is shared Prime daemon server behavior; no wire schema or client changes.
Implemented by Antigravity (gemini-3.8-flash-high) through Pylon delegation; reviewed, corrected, and verified by Codex (GPT-6) in the Codex harness.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.