Skip to content

feat(provider): add native Muse Code support for orchestration v2 - #11392

Closed
cristianuibar wants to merge 595 commits into
pingdotgg:t3code/codex-turn-mappingfrom
cristianuibar:codex/muse-orchestrator-v2
Closed

cristianuibar wants to merge 595 commits into
pingdotgg:t3code/codex-turn-mappingfrom
cristianuibar:codex/muse-orchestrator-v2

Conversation

@cristianuibar

@cristianuibar cristianuibar commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

What Changed

Add Muse Code as a beta provider, disabled by default, through the official @muse-code/sdk and orchestration V2's provider-instance registry. Users enable it on their T3 server and select its models from web, desktop, or mobile, including catalog-supported reasoning efforts.

The adapter provides native sessions, streaming, tools, approvals, questions, images, steering, interruption, saved-session continuation, compaction, and conversation-context handoff. Setup includes model discovery, health checks, updates, structured text generation, and CLI conversation import.

Public forks start a new session with portable conversation context. Native fork and rewind remain disabled because explicit completed-turn fork boundaries fail on the tested Muse versions. Separate Plan mode, controllable native subagents, automatic approval review, subscription-usage reporting, and automatic T3 tool injection are unavailable; native child activity remains visible.

Review fixes reject foreign-provider token-usage history, enforce one-message import budgets, remove API-key environment overrides regardless of name casing, and expose only known approval persistence scopes. The rebase also integrates Muse with V2's consolidated provider icon component.

Why

This implements Ideas #6892 and #5516 against #2829's orchestration V2, following the suggestion on #11258. The original implementation in #11258 remains open pending a maintainer decision. Neither PR implies approval to merge both implementations.

Updated against t3code/codex-turn-mapping at bd519e66b. The integration spans 68 files, with 9,626 additions and 247 deletions. It exceeds the contribution guidelines' preferred size; its scope is Muse and the necessary server/client integration.

Validation

  • 711 tests pass across all 22 PR-touched test files. The final run includes the foreign-provider import regressions. After the upstream-only merge, 92 tests across the affected V2 runtime/import suites pass; the provider integration diff is unchanged. Coverage includes provider-instance isolation, lifecycle cleanup, import/resume, effort forwarding, approvals, portable forks, and unsupported rewind.
  • Server, web, and mobile typechecks pass. PR-scoped lint has zero errors; existing warnings remain. Formatting and git diff --check pass.
  • Direct SDK/MSP checks passed on Muse Code 1.2.1-R2847.1 and 1.3.0-R3057.1, using @muse-code/sdk 0.1.1 (npm latest). Meta's stable channel reported 1.3.0; its separate test binary matched the published SHA-256.
  • On both CLI versions, Contributor turns requesting max, process shutdown/restart, exact-session resume, marker recall, and a full-history native fork followed by another turn completed. All test hosts shut down with exit code 0. Both binary-exported schemas include max; SDK 0.1.1's older declaration omits it. These checks establish protocol acceptance and successful turns, not an independently observed effective effort at Meta's model endpoint.
  • Explicit native forks at a completed turn ID returned InvalidCut on both versions. Native rewind remains unavailable. Full-history forks retained the effective Contributor model according to session-scoped model/list, so the earlier 1.1.1 model-switch observation was not reproduced on these versions.
  • Historical integrated web evidence below was captured on ae08ccc38 with Muse 1.1.1. No new browser pass was performed for these review fixes; current validation is focused tests, typechecks, and direct SDK/MSP checks. Native desktop/mobile apps and relay/tunnel connections were not exercised.
  • Independent Codex source review covered rebase adaptations and review fixes. GitHub CI requires maintainer approval for this fork; CodeRabbit skips this target branch.

UI Changes

V2 base Muse enabled
Providers before Muse Muse in the provider list

Muse settings

Watch stop and continuation (65 seconds). The shell command had produced output before the stop settled.

Successful follow-up after interruption

Portable context fork completed on Contributor/Max

Watch the portable fork (76 seconds). Rewind reports unavailable and preserves history.

Checklist

  • This PR is small and focused — focused on Muse; size exceeds the preferred limit and is disclosed above.
  • I explained what changed and why.
  • I included before/after screenshots for UI changes.
  • I included video for interaction changes.

Implementation, review fixes, rebases, and verification: GPT-6 through Codex, with independent Codex subagent reviews.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:XXL 1,000+ changed lines (additions + deletions). labels Sep 12, 2026
@cristianuibar

Copy link
Copy Markdown
Contributor Author

Cross-reference: the original Muse integration is #11258, and it remains open pending a decision. Its branch and target are unchanged.

This PR is the separate orchestration V2 implementation requested following the discussion on #11258. It targets #2829 at e03e376a356c55ae028600f4eed9eda9138a5a0b, with references to the V2 adapter contract and wire contracts.

Validation and the native fork/rewind limitation are recorded in the PR description. No merge or closure of either Muse PR is implied.

@cristianuibar
cristianuibar marked this pull request as ready for review September 12, 2026 07:56
@juliusmarminge
juliusmarminge force-pushed the t3code/codex-turn-mapping branch 3 times, most recently from 600a8a5 to d8c75ec Compare September 15, 2026 00:23
@juliusmarminge
juliusmarminge force-pushed the t3code/codex-turn-mapping branch 2 times, most recently from 463d0c6 to e10a1e2 Compare September 15, 2026 06:28
@cristianuibar
cristianuibar force-pushed the codex/muse-orchestrator-v2 branch from 347efd8 to 98e4638 Compare September 15, 2026 06:57
@juliusmarminge
juliusmarminge force-pushed the t3code/codex-turn-mapping branch 18 times, most recently from c267746 to 934da57 Compare September 18, 2026 08:57
@cristianuibar
cristianuibar force-pushed the codex/muse-orchestrator-v2 branch from bc73497 to 35a15f7 Compare September 19, 2026 14:24
@juliusmarminge
juliusmarminge force-pushed the t3code/codex-turn-mapping branch 2 times, most recently from a1f8051 to 0337dd6 Compare September 21, 2026 05:40
@Salahw7

Salahw7 commented Sep 22, 2026

Copy link
Copy Markdown

any update on this?

@juliusmarminge
juliusmarminge force-pushed the t3code/codex-turn-mapping branch 10 times, most recently from fe4f6ad to 87c67bd Compare September 25, 2026 05:55
@t3dotgg

t3dotgg commented Oct 1, 2026

Copy link
Copy Markdown
Member

Note

🤖 GPT-6 Astra responding on behalf of Theo

We're closing this as part of a cleanup of old PRs. Thank you for the time and care you put into this contribution.

The current comparison includes 1,481 files and 483,516 changed lines, with conflicts in 558 files against the target branch. Much of that comparison comes from diverged base history, beyond the change described here. The latest implementation commit is from 2026-09-19.

At this point, regenerating a focused patch against the current intended base would be easier to review and maintain than updating this PR. We appreciate the problem report and the work already done; this thread will remain available as a reference. If you revisit it, please confirm the current direction with us and link a fresh, focused PR back here.

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

Labels

size:XXL 1,000+ changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.