Skip to content

fix(server): reserve the dispatcher role for multi-agent work - #146

Open
lukemaj wants to merge 1 commit into
mainfrom
fix/dispatcher-only-for-coordination
Open

lukemaj wants to merge 1 commit into
mainfrom
fix/dispatcher-only-for-coordination

Conversation

@lukemaj

@lukemaj lukemaj commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

What: Agents are now told to start a dispatcher only when work needs several agents coordinated; a single bounded change goes to one worker.
Why: The tool instructions said every one-PR job should go to a dispatcher, so a small UI change got a coordinator on the dispatcher model list (GPT-6.1 Sol) instead of a worker on the configured worker lane.
So what: Merging needs the user's approval; afterwards new agent sessions pick up the wording.

Changes the guidance in apps/server/src/mcp/toolInstructions.ts and the spawn_thread description in apps/server/src/mcp/toolkits/threads/tools.ts, plus the test that pins the instruction text.

Proof: pnpm exec vp test run apps/server/src/mcp/toolInstructions.test.ts gave 7 passed.

Elon record

  • Requirements and who asked: the user asked that dispatchers be used only for multi-agent coordination on bigger work, not quick changes.
  • Deleted: the "job that ends in one PR" trigger for dispatchers.
  • Bottleneck: the instruction text agents read at session start; no code path chooses roles.
  • Checked myself: grepped apps and packages; the two strings above (and their test) are the only places that route one-PR jobs to a dispatcher.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XS labels Oct 2, 2026
@github-actions

github-actions Bot commented Oct 2, 2026

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 13.5 KiB 13.5 KiB −13 B (−0.1%) 15.1 KiB ✅
Codex Thread snapshot wire 7.1 KiB 7.1 KiB 0 B (0.0%) 7.3 KiB ✅
Codex Live turn WebSocket wire 6.4 KiB 6.4 KiB −13 B (−0.2%) 7.8 KiB ✅
Codex Live turn WebSocket decoded 56.2 KiB 56.2 KiB 0 B (0.0%) 66.4 KiB ✅
Codex Live turn messages 9 9 0 (0.0%) 21 ✅
Claude Total thread wire 13.5 KiB 13.5 KiB +9 B (+0.1%) 15.1 KiB ✅
Claude Thread snapshot wire 7.1 KiB 7.1 KiB −1 B (−0.0%) 7.3 KiB ✅
Claude Live turn WebSocket wire 6.4 KiB 6.4 KiB +10 B (+0.2%) 7.8 KiB ✅
Claude Live turn WebSocket decoded 57.0 KiB 57.0 KiB 0 B (0.0%) 66.4 KiB ✅
Claude Live turn messages 9 9 0 (0.0%) 21 ✅

Baseline: 7dd561e · PR result: 42e04d6 · 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: 114.0 KiB
  • Claude decoded thread snapshot: 114.7 KiB

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

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 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