fix(mcp): launch parallel children before waiting#23241
Problem
Submitting two delegate_task calls with mode:"wait" together can delay the second launch until the first wait returns because the provider's MCP client serializes the calls. The guidance did not explain this or require launch confirmation before reporting a child as running.
Change
Tell agents to launch all parallel children with mode:"async", retain the returned task IDs, and confirm launch responses before describing children as running. Apply the guidance to orchestration instructions, the tool description, and the mode parameter description.
Scope and approval
Fixes #23175 GitCafe: https://git.cafe/pingdotgg/t3code/issues/23191 Triaged bug via the automated issue flow. Guidance only; no scheduling or wire-schema changes.
Verification
vp test run apps/server/src/provider/CodexDeveloperInstructions.test.ts: 16 tests passed on the final head, including the instruction byte limit and delivery order.- Scoped lint, formatting, and
git diff --check: passed. - Two independent diff reviews: MERGE, no confirmed findings.
- Runtime probe: Codex
gpt-6.1-sol; two batched 10-second waits with children runningsleep 15. B's tool call started 74 ms after A's wait returned. With async launches, both responses confirmed running task IDs within 795 ms. These baseline probes used the installed host. - Fixed current-main dev build: actual provider context and MCP
tools/listexpose all three updated guidance surfaces; two async child launches completed before status checks.
Runtime evidence index, sanitized fixed-build transcript, and proof matrix.
No visual paths changed; the visual fixture matrix is empty. No new unit test was added: the serialization occurs in the provider's MCP client before the second request reaches T3, and a source-string assertion would only repeat the guidance. Runtime verification used Codex; Claude direct parallel tool use was not independently rerun.
Models: GPT-6.1-Sol and Claude Opus 5.5. Harness: T3 Code through Codex and Claude Code.
Checks
- SuccessfulCodeRabbitGitHub
Review completed
- SuccessfulNative fingerprint diffGitHub
- SkippedDeploy web previewGitHub
- SkippedEAS PreviewGitHub
- Skipped
- Skipped
- Skipped
- SkippedRemove preview downloadGitHub
- Skipped
- SkippedBuild preview JS bundleGitHub
- Skipped
- Skipped
- SkippedRemove preview downloadGitHub
- SkippedDeploy web previewGitHub
- SkippedBuild preview JS bundleGitHub
- SkippedEAS PreviewGitHub
- SkippedEAS PreviewGitHub
- SkippedDeploy web previewGitHub
- SkippedDeploy web previewGitHub
- SkippedBuild preview JS bundleGitHub
- SkippedEAS PreviewGitHub
- SkippedBuild preview JS bundleGitHub
- SuccessfulCheckGitHub
- Skipped
- SkippedRustGitHub
- SuccessfulTest WebGitHub
- SuccessfulTestGitHub
- SuccessfulRelease SmokeGitHub
- SuccessfulBuild and TypecheckGitHub
- SkippedEAS PreviewGitHub
- Skipped
- SuccessfulLabel PR sizeGitHub
- SuccessfulLabel PR 23256GitHub
- Skipped
- Successful
- Successful
- SuccessfulPrepare PR size configGitHub
- SuccessfulCollect PR targetsGitHub
- SuccessfulTest Server 7GitHub
- SuccessfulTest Server 3GitHub
- SuccessfulTest Server 1GitHub
- SuccessfulTest Server 4GitHub
- SuccessfulChangesGitHub
- SuccessfulTest Server 5GitHub
- SuccessfulTest Server 6GitHub
- SuccessfulTest Server 2GitHub
- SuccessfulTest Server 8GitHub
- SuccessfulLintGitHub
- SuccessfulNative fingerprint diffGitHub
Added 2 commits
Approvability
Verdict: Approved at 5f90bd3
Macroscope's review found this PR approvable — This small bug fix updates the existing orchestration guidance so parallel child tasks launch asynchronously before any blocking waits, without changing schemas, defaults, or execution infrastructure. The runtime impact is narrow and self-contained.
You can add or adjust custom eligibility rules. Learn more.
Thread transfer impact
✅ Thread transfer remains within every enforced ceiling.
| Provider | Metric | Main baseline | This PR | Impact | PR ceiling | |
|---|---|---|---|---|---|---|
| Codex | Total thread wire | 5.0 KiB | 5.0 KiB | +7 B (+0.1%) | 6.8 KiB | ✅ |
| Codex | Thread snapshot wire | 3.8 KiB | 3.8 KiB | 0 B (0.0%) | 4.9 KiB | ✅ |
| Codex | Live turn WebSocket wire | 1.2 KiB | 1.2 KiB | +7 B (+0.6%) | 2.0 KiB | ✅ |
| Codex | Live turn WebSocket decoded | 20.9 KiB | 20.9 KiB | 0 B (0.0%) | 29.3 KiB | ✅ |
| Codex | Live turn messages | 2 | 2 | 0 (0.0%) | 8 | ✅ |
| Claude | Total thread wire | 5.0 KiB | 5.0 KiB | 0 B (0.0%) | 6.8 KiB | ✅ |
| Claude | Thread snapshot wire | 3.8 KiB | 3.8 KiB | 0 B (0.0%) | 4.9 KiB | ✅ |
| Claude | Live turn WebSocket wire | 1.2 KiB | 1.2 KiB | 0 B (0.0%) | 2.0 KiB | ✅ |
| Claude | Live turn WebSocket decoded | 21.2 KiB | 21.2 KiB | 0 B (0.0%) | 29.3 KiB | ✅ |
| Claude | Live turn messages | 2 | 2 | 0 (0.0%) | 8 | ✅ |
Baseline: 6318bfc · PR result: 5f90bd3 · 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: 108.5 KiB
- Claude decoded thread snapshot: 108.8 KiB
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
- Configuration used: Path: .coderabbit.config.ts
- Review profile: CHILL
- Plan: Team
- Run ID:
daf8ed5a-6ecc-4eb1-8146-9d8eafe630ec
📥 Commits
Reviewing files that changed from the base of the PR and between 6318bfc597e544679848c4ed816606bacd32a175 and 5f90bd3add7ede32d1fa75c2c298a324d4629d45.
📒 Files selected for processing: 3
apps/server/src/mcp/toolkits/orchestrator/tools.tspackages/contracts/src/orchestratorMcp.tspackages/provider-core/src/server/orchestrationInstructions.ts
Limit details: You’ve used all 10 included reviews currently available.
📝 Walkthrough
The
delegate_taskdescriptions and orchestration instructions now direct callers to launch parallel children asynchronously before waiting, retain returned task IDs, and confirm launches before describing children as running.Changes: Parallel delegated-task guidance
Layer / File(s) Summary Asynchronous launch instructions
apps/server/src/mcp/toolkits/orchestrator/tools.ts,packages/contracts/src/orchestratorMcp.ts,packages/provider-core/src/server/orchestrationInstructions.tsThe tool descriptions and orchestration instructions document asynchronous launches before blocking waits, task ID retention, and launch confirmation. They also note that MCP clients may serialize batched wait calls. Priority: ⬇️ Low
Estimated code review effort: 1 (Trivial) | ~5 minutes
Change: Bug fix
Possibly related issues
pingdotgg/t3code#23175— The issue reports that batcheddelegate_taskcalls in wait mode can start sequentially. This change advises launching children asynchronously before waiting.
Suggested reviewers:
gustavonline,lastobelus
Merge Risk: ⚪ Minimal · up to 5f90b
The guidance matches the task-management flow, and no concrete merge-blocking risk is established.
Pre-merge checks: Passed 4
Check name Status Explanation Title check Passed The title clearly and concisely describes the main change: launching parallel MCP children before waiting. Linked Issues check Passed Check skipped because no linked issues were found for this pull request. Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request. Description check Passed The pull request includes all required sections. It clearly describes the problem, the guidance-only change, scope references, focused verification results, limitations, and agent details. The verific… Full details: Description check
Explanation
The pull request includes all required sections. It clearly describes the problem, the guidance-only change, scope references, focused verification results, limitations, and agent details. The verification section provides specific commands and observed runtime results.
✨ Finishing Touches
📝 Generate docstrings
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
- Commit to this branch
- Create a new PR
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.