fix(prime): wait for async child continuations - #81
Merged
Conversation
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. |
rynfar
force-pushed
the
fix/prime-agent-async-continuations
branch
from
August 25, 2026 15:01
998affa to
0e29409
Compare
rynfar
force-pushed
the
fix/prime-agent-async-continuations
branch
from
August 25, 2026 16:40
0e29409 to
7e3529c
Compare
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.
Problem
Prime daemon sessions completed Pylon's canonical turn at the first native
RunCompletedevent. A depth-1 child could finish afterward and resume its parent internally, but Pylon had already emitted a false missing-final warning, completed the turn, dropped the resumed final answer, and left the client in a stale working state.Fix
waitForHeadlessCompletion({ waitForRlmQuiescence: true })boundary after each Pylon-owned daemon promptCloses #80.
Verification
vp run -F t3 typecheck— passedgit diff --check— passed7e3529c3awith Prime Agent 0.8.0 — one depth-1 child completed after the root response boundary and resumed its parent withPYLON-ASYNC-FINAL-7E35; SQLite recorded one completed canonical turn, both root response segments, no runtime error or false missing-final warning, and the terminal reported cost included the child-inclusive cumulative usage delta7e3529c3a— 11 checks passed, 3 expected skips, 0 failuresImplemented by GPT-5.6 Sol using Prime Agent.
Need help on this PR? Tag
@codesmithwith what you need. Autofix is disabled.