fix(server): align delegated review follow-up guidance #24560
main fromrefs/pull/24560/head·merged by juliusmarminge View on GitHubDelegation guidance prohibited same-child follow-ups even though t3_thread_send supports them. Shared instructions, the delegate_task description, and the existing guide now distinguish independent review rounds from conversation-dependent follow-ups. No runtime, inputs, permissions, or wire behavior changes.
Fixes #19821. Replaces #20053.
Original description by @Lenoridev
Delegation guidance previously prohibited reusing a child conversation even though t3_thread_send supports that workflow. Shared provider instructions, the delegate_task description, and the existing internal guide now distinguish independent review rounds from follow-ups that need the same child's context.
Independent rounds still use a fresh delegate_task. Same-conversation follow-ups use t3_thread_send on childThreadId; its existing description retains the precise active/completed-task behavior.
Fixes #19821. Original fix by @Lenoridev in this PR. The takeover removes duplicated lifecycle prose and reduces the regression assertions from nine to four across two existing tests.
Validation: provider-core instruction/runtime tests (13), server guidance/Codex size/MCP integration tests (29), both package typechecks, lint, and formatting pass. The positive and negative regression checks fail when the old contradictory guidance is restored. No runtime or wire behavior changed, and no live model response is claimed.
Two rounds of independent Opus and Sol reviews found no remaining blockers; the stale internal guide identified in the first round is corrected.
Prepared with Claude Opus 5.5, Claude Fable 5.1, and GPT-6.1 Sol via T3 Code, coordinated with Codex.
Takeover#
Original fix by @Lenoridev in #20053; retained its guidance correction and ported it to current main. The original test files were deleted on main, so two focused regressions use existing Codex-context and MCP integration files. Removed the new test regexes in favor of literal checks.
Evidence#
Full matrix · Evidence index and public reconstruction scripts
Before: eea9895. After: c3eda49.
| Matrix rows | Before / after proof | Result |
|---|---|---|
| S1 shared instructions | Paired transcript | Independent review and same-child routes agree; obsolete bans removed |
| S2 Codex context | Full transcript | Four browser/device combinations; entries remain within size cap |
| S3–S4 Codex exclusion / Claude | Source gates, full transcript | Unchanged inclusion gates; shared suffix assembly |
| S5 Cursor | Full transcript | All four first-run/MCP combinations |
| S6–S7 ACP | Full transcript and source gates | 40 state/prompt tuples per revision; slash bypass, source compaction gate |
| S8 OpenCode | Full transcript and source gates | Enabled/disabled helper; legacy and v2 call sites |
| S9 Pi | Full transcript and source gates | Decoded generated literal; section and fallback assembly; credential gate inspected |
| T1 delegate_task | Paired transcript | Exact decoded description projection; not an HTTP/stdio exchange |
| T2 t3_thread_send | Paired transcript | Byte-identical existing semantic reference |
| D1 internal guide | Paired transcript | Corrected independent-round and follow-up paragraph |
| X1 regression tests | Before/red, after/green | 2 fail / 21 pass with old production text → 23 pass |
| N1–N2 | N/A | No UI, interaction, wire, or permission change |
Environment: fs-40, Linux x86_64, Node 26.12.1, Vite+ 5.0.5. Deterministic text/module rendering plus source-gate inspection; no live provider invocation. What else changed: only test coverage and documentation wrapping; unrelated instruction sections and t3_thread_send are unchanged. Uploaded scripts stay outside the PR.
Verification log
- Tests: CodexDeveloperInstructions 3→4; McpHttpServer 18→19; 21→23 total. Both new tests fail with pre-fix production strings. Final scoped run including existing orchestrator replay integration: 25 pass across 3 files.
- Scoped lint and formatting pass. No production regex, parser or input loop changes; added test regexes were removed. No repo-wide checks.
- Review round 1: Sol MERGE; Opus FIX_FIRST for pending transcript evidence; no code bugs. Test-regex backtracking was also removed.
- Review round 2: fresh Sol and Opus both MERGE on the final head with evidence.
- Proof audit: SUFFICIENT; all 13 affected rows pass, independent reconstruction has zero byte mismatch.
- CI: pending on the published final head; no failures or bot findings at handoff. Scoped local checks pass. No merge performed.
- Unverified surfaces: none of the affected text-output rows; UI captures are inapplicable. Live model compliance, conversation memory and actual MCP transport execution are not claimed.
- Models/harnesses: Claude Opus 5.5 via Claude Agent and GPT-6.1 Sol via Codex, coordinated in T3 Code.
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:S
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
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 0 B (0.0%) 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 0 B (0.0%) 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:
eea9895· PR result:c3eda49· Source CI: successScenario 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.
juliusmarminge added labelsbugfix
juliusmarminge added labelspr:ready
juliusmarminge merged this909e4c9
juliusmarminge closed this
Sign in to join this conversation.
Approvability#
Verdict: Approved at
c3eda49Macroscope's review found this PR approvable — This focused guidance correction distinguishes independent review rounds from same-child follow-ups using the existing
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).t3_thread_sendcapability, while leaving orchestration implementation, permissions, defaults, and wire behavior unchanged. Regression coverage verifies both exposed instruction surfaces.