You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
#418 step 4: Isolate provider and MCP managed policy and verify delegation integration #436
Part of #418. Step 4 of 4. Depends on step 3. Full scope, tests and done criteria are in the canonical plan: #418 (comment) (item 4).
Scope: move managed instruction and tool policy assembly out of the Codex and Claude adapters, and finish thin MCP composition.
Preserve: the native execution fixes and Writer routing.
Tests: extend ManagedIssueDelegation, the relevant adapter fork suites, the MCP toolkit registration and outside-client tests, and the result-read acknowledgement cases. If model-facing text changes, follow evals/README.md (free checks only).
Done:
managed policy lives outside the adapters;
registration succeeds with EnabledWhen intact;
focused suites and check:changed pass.
The primary integrator then does one Replay-backed web/desktop pass covering:
start and queued work;
a question;
a cancel;
sibling completion;
result recovery after a restart.
Publish the before/after numstat and the residual-hunk ledger on #418.
I've opened draft PR #475, which closes #436 and references #418. Managed instruction and tool-policy assembly no longer lives in the Codex and Claude adapters, and focused tests show no new failures beyond the known ones. check:changed fails in two places I didn't cause (typecheck in apps/mobile, and the known #470 tests). The integration pass couldn't cover sibling completion, because the Replay provider can't start delegated children.
What changed
One policy on the session: the session now carries one composed policy: instruction sections, model roles, and whether native subagents are allowed. It's built outside the adapters. The worker/root role comes from IssueEligibility.managedIssueRole, and the composer is t3OrchestrationPolicy in provider-core.
Adapters only translate it:
Codex: the sections become its context entries, and "no native subagents" becomes its multi-agent feature flags.
Claude: the policy becomes its system-prompt text and the blocked Agent/Task/TeamCreate tools.
Claude query reuse: a role change still restarts Claude's live query; a model-roles refresh still doesn't.
Thinner MCP service:
propose_issue_change moved into RepositoryOrchestrationMcp.
delegate_task reuses that module's existing check that the caller's repository root hasn't been retired.
The three copies of the thread loader collapsed into one.
The order of checks and the error messages are unchanged.
Wording:propose_issue_change now says approvals wait "in the issue panel". That's where the approval card actually is on the Roadmap, on upstream's Issues page, and in a thread's issue panel. "On the Roadmap page" would have added a byte to the agent-context budget, which CI rejects without a label; the new wording is the same length.
A fix this exposed: in managed Claude sessions, the issue instructions were glued onto the end of the runtime block with no gap (…</pull_request_linking>Keep issues current…). They're now a separate paragraph. Ordinary sessions get byte-identical text.
Focused set, 20 files: 1063 passed and 6 failed. One failure was my own new assertion, which I fixed and reran (10/10). The other 5 are the known 16 tests already fail on main in files check:changed rarely selects #470 cases: Claude monitor typing (two copies), the Claude roster test, and two Codex native-subagent tests.
Evals (free checks only):--context shows tool-description size unchanged, and --dry-run built all 4 issue-blocker requests. I added no eval case, since a new case can't be shown failing without a paid run.
New tests, extending existing suites:
role changes produce different Claude query keys;
a thread linked to an issue gets the worker policy on its session;
propose_issue_change refuses an outside client and a retired root's subtree.
Integration pass (Replay provider, isolated dev server, seeding off)
Start and queued work: a message sent during a running turn was queued and ran afterwards.
Question: answered in the UI, and the turn completed.
Cancel: "Stop generation" left the thread interrupted.
Restart: I stopped my dev server by its PIDs with a turn running and a follow-up queued. After restarting, the thread showed the turn cancelled by shutdown, then resumed, and the queued follow-up ran.
Sibling completion and delegated-result recovery: not reachable. The Replay provider only replays recorded output and never calls T3's tools, so it can't start delegated children; managed work also needs Codex or Claude. Step 3's committed-event fixture tests cover these instead. A real pass would need a paid Haiku run.
Browser view: the browser tab was hidden and produced no screenshots, so I read the page text and used the t3 thread show command instead.
Cleanup: the dev server is stopped by its PIDs and the browser tab is closed.
The PR body has the before/after numstat against 7d32075e37 (and against the latest sync, b387e3a179) and the residual-hunk ledger. Against 7d32075e37, the MCP service went from +455 to +415 lines, the Codex adapter from +529 to +523, and the Claude adapter from +1032 to +1030. Orchestrator, EffectWorker and ProjectionStore are unchanged. Issue #436's text also asks for the numstat and ledger to be posted on #418; I haven't posted them there.
PR #475, head 6c57ff4, checks and reviews none reported yet (draft, not merged).
Activity
tannerpolley commentedon Nov 18, 2026
T3 Code status: Done
Issue: #436 #418 step 4: Isolate provider and MCP managed policy and verify delegation integration
Thread: thread:delegated-task:command%3Amcp%3A53eed4d4-49de-4205-ba6f-a35a0b15b7c9%3Adelegate-task%3Aissue-436-418-step4-2026-11-18
Model: claude-opus-5-5
Branch: issue-436-418-step-4-isolate-provider-and-mcp
Updated: 2026-11-18T02:08:48.944Z
tannerpolley commentedon Nov 18, 2026
T3 Code closeout: done
Issue: #436 #418 step 4: Isolate provider and MCP managed policy and verify delegation integration
Thread: thread:delegated-task:command%3Amcp%3A53eed4d4-49de-4205-ba6f-a35a0b15b7c9%3Adelegate-task%3Aissue-436-418-step4-2026-11-18
Model: claude-opus-5-5
Branch: issue-436-418-step-4-isolate-provider-and-mcp
Completed: 2026-11-18T02:08:49.146Z
I've opened draft PR #475, which closes #436 and references #418. Managed instruction and tool-policy assembly no longer lives in the Codex and Claude adapters, and focused tests show no new failures beyond the known ones.
check:changedfails in two places I didn't cause (typecheck inapps/mobile, and the known #470 tests). The integration pass couldn't cover sibling completion, because the Replay provider can't start delegated children.What changed
IssueEligibility.managedIssueRole, and the composer ist3OrchestrationPolicyin provider-core.Agent/Task/TeamCreatetools.propose_issue_changemoved intoRepositoryOrchestrationMcp.delegate_taskreuses that module's existing check that the caller's repository root hasn't been retired.propose_issue_changenow says approvals wait "in the issue panel". That's where the approval card actually is on the Roadmap, on upstream's Issues page, and in a thread's issue panel. "On the Roadmap page" would have added a byte to the agent-context budget, which CI rejects without a label; the new wording is the same length.…</pull_request_linking>Keep issues current…). They're now a separate paragraph. Ordinary sessions get byte-identical text.Checks (all through
agent-heavy)check:changed: format, lint, knip and graphql pass. Tests: 927 passed, with only those same 5 16 tests already fail on main in files check:changed rarely selects #470 failures.check:changedtypecheck: fails only inapps/mobile(three files). This branch didn't cause it: mobile doesn't import provider-core, and nothing in mobile, contracts or client-runtime changed. It isn't covered by 16 tests already fail on main in files check:changed rarely selects #470, 11 server tests fail on main: FoundationPersistence (9) and Orchestrator.control-reads (2) #449 or Webhook test fails when an extra migration is registered (interrupt point moves) #468, and I didn't open an issue for it.--contextshows tool-description size unchanged, and--dry-runbuilt all 4 issue-blocker requests. I added no eval case, since a new case can't be shown failing without a paid run.propose_issue_changerefuses an outside client and a retired root's subtree.Integration pass (Replay provider, isolated dev server, seeding off)
t3 thread showcommand instead.The PR body has the before/after numstat against
7d32075e37(and against the latest sync,b387e3a179) and the residual-hunk ledger. Against7d32075e37, the MCP service went from +455 to +415 lines, the Codex adapter from +529 to +523, and the Claude adapter from +1032 to +1030. Orchestrator, EffectWorker and ProjectionStore are unchanged. Issue #436's text also asks for the numstat and ledger to be posted on #418; I haven't posted them there.PR #475, head 6c57ff4, checks and reviews none reported yet (draft, not merged).