Skip to content

fix(pair): pair_await lists the latest turn's files only - #651

Merged
rynfar merged 1 commit into
pylonfrom
fix/pair-await-latest-files
Sep 18, 2026
Merged

rynfar merged 1 commit into
pylonfrom
fix/pair-await-latest-files

Conversation

@rynfar

@rynfar rynfar commented Sep 18, 2026 •

Copy link
Copy Markdown
Collaborator

What

pair_await now lists the files changed by the executor's latest turn, not by every turn it has ever run.

Why

A pair keeps one executor for the life of the lead thread, so its checkpoints accumulate. filesChanged aggregated all of them, which meant that by the fifth brief the lead was handed the files of the first four again. That is noise in the one result the lead is supposed to review carefully, and tokens it pays for on every await.

How

  • latestTurnCheckpoints(checkpoints, latestTurnId) in pair/logic.ts keeps the checkpoints whose turnId is the executor's latest turn; a turn that changed nothing has no checkpoint and shows no files.
  • pair_await aggregates over those. turnCount still counts every completed turn.
  • The fan-out delegated_thread_result is unchanged: a fan-out child normally runs one task.

Verification

  • vp test run on the pair and delegation toolkits and apps/server/src/orchestration, on this branch rebased over feat(pair): pair without the Pylon delegation setting #648: 926 passed. New: the pure rule, and a handler test with two turns where only the second turn's file is listed and turnCount is 2. Both were written first and seen failing.
  • Typecheck t3: 0 errors. Format clean.
  • Not run live.

Part of #622.

Model: Claude Fable 5.1, in Pylon via the Claude Code harness.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:S labels Sep 18, 2026
@rynfar
rynfar merged commit bff59e8 into pylon Sep 18, 2026
17 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 14.0 KiB 13.9 KiB −31 B (−0.2%) 15.1 KiB ✅
Codex Thread snapshot wire 7.2 KiB 7.2 KiB +5 B (+0.1%) 7.3 KiB ✅
Codex Live turn WebSocket wire 6.8 KiB 6.7 KiB −36 B (−0.5%) 7.8 KiB ✅
Codex Live turn WebSocket decoded 58.0 KiB 58.0 KiB −44 B (−0.1%) 66.4 KiB ✅
Codex Live turn messages 10 9 −1 (−10.0%) 21 ✅
Claude Total thread wire 14.0 KiB 14.0 KiB −2 B (−0.0%) 15.1 KiB ✅
Claude Thread snapshot wire 7.2 KiB 7.2 KiB +1 B (+0.0%) 7.3 KiB ✅
Claude Live turn WebSocket wire 6.8 KiB 6.8 KiB −3 B (−0.0%) 7.8 KiB ✅
Claude Live turn WebSocket decoded 58.9 KiB 58.9 KiB 0 B (0.0%) 66.4 KiB ✅
Claude Live turn messages 10 10 0 (0.0%) 21 ✅

Baseline: 933d6f7 · PR result: e2c521c · Source CI: success

Scenario and decoded snapshot size

10 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.

  • Codex decoded thread snapshot: 115.6 KiB
  • Claude decoded thread snapshot: 116.3 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

This branch was successfully deployed

1 active deployment
Preview — e2c521cc Deployed Sep 18, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant