Repository navigation
feat(pair): pair toolkit linking a lead thread to one executor - #628
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 was referenced Sep 18, 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.
Problem
Fan-out delegation cold-starts a fresh child in a fresh worktree for every task, and parents poll for results. On 2026-09-17 and 18 that meant 33 Antigravity children and 84 child turns in two days, plus 304 status polls by parents in a week. The direction in #622 is one persistent executor per lead thread instead.
What this adds
A
pairMCP toolkit beside the fan-out one. No contract, event, decider, projector, or migration changes.pair_startlinks an executor,pair_handoffsends it a brief,pair_awaitwaits for it and returns its final message and changed files,pair_stoprequests an interrupt.pair, so its id isdelegated:<lead>:<16 hex of sha256(lead + "\n" + "pair")>. Every client and the server compute it from the lead's id; nothing records the link. A pair is on when that thread exists and is not archived. The fan-out tools refuse the key withDelegationKeyReservedError.branchandworktreePath. No worktree is created or cleaned up, and there is nothing to merge back.idleuntil it is briefed.steer: true. The steer message id is derived from the turn id, so one steer per turn holds across restarts.pair_awaitblocks inside the tool call. The cap follows the lead's provider: 150 seconds where Pylon sets that provider's MCP tool timeout itself (Codex), 45 seconds elsewhere. OmittingmaxSecondsdoes not wait.delegationcapability.Not covered
pair_start, normally because the user asked.Verification
Run independently by the lead in the executor's worktree, not taken from its report:
vp test run apps/server/src/mcp/toolkits/pair apps/server/src/mcp/toolkits/delegation apps/server/src/mcp/McpHttpServer.test.ts packages/client-runtime/src/work-log/presentation.test.ts: 8 files, 221 tests passed.vp run -F t3 typecheckandvp run -F @t3tools/client-runtime typecheck: exit 0.vp run knip:check: clean.pair/tools.ts) and the 37 pair tests were written by the lead before implementation and are byte-identical after it (blob hashes checked). All 37 failed against stubs first.decider.ts,projector.ts, migrations,packages/contracts,ws.ts.Part of #622.
Contract, tests, docs, and review by Claude Fable 5.1 in Claude Code; handlers and rules implemented by Gemini 3.8 Flash (High) in Antigravity, as a Pylon delegated child.