Repository navigation
fix(pair): no argument turns pair_await or delegated_thread_status into a poll - #654
Merged
Merged
Conversation
|
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 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.
What
Two guards so neither waiting tool can be used as a poll.
pair_await: a lead may read a running executor instantly (maxSeconds: 0) twice in a row. A third instant read waits the whole cap instead. Any wait, or finding the executor not running, clears the count.delegated_thread_status: omitted or0reads the state; any positivewaitSecondswaits the whole 45 seconds. It already returns the moment the child changes, so a shorter wait gains nothing.Both tool descriptions say so.
Why
#640 made positive
pair_awaitwaits run to the cap after a live Codex lead looped on 10 to 20 second waits, but left two holes: a loop onmaxSeconds: 0, and the same short-wait loop on the fan-out status tool. Each return from either tool is a model turn.How
pairAwaitPlan(pure) returns the wait budget and the next instant-read count; the handler keeps the count per executor in memory beside the protected-path record.delegatedStatusWaitSeconds(pure) andMAX_STATUS_WAIT_SECONDSmove the cap intodelegation/logic.ts.Verification
vp test runonapps/server/src/mcp/toolkitsandapps/server/src/orchestration: 958 passed. Five tests were written first and seen failing: both pure rules, a handler test where the third instant read reportswaitedSeconds: 45, and the fan-out test that used to return after 5 seconds.t3: 0 errors. Format andvp run knip:checkclean.How it was built
This is the first change made through pair mode itself on a real install (nightly
.201): a Claude lead paired with an Antigravity executor (gemini-3.8-flash-high) sharing one worktree. The lead wrote the contract and tests and listed the four test files asprotectedPaths; onepair_handoff; Pylon woke the lead when the executor finished;pair_awaitreportedprotectedPaths: { checked: 4, changed: [] }; the lead read the diff, re-ran everything above, and wrote the docs and this text. One executor turn, no corrections needed.Part of #622.
Model: Claude Fable 5.1 (lead) with an Antigravity executor, paired in Pylon via the Claude Code harness.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.