Skip to content

fix(sandbox): a sandbox chat's model and effort behave like any T3 chat - #70

Merged
t3-code-sandboxes[bot] merged 4 commits into
feat/sandbox-environmentsfrom
fix/sandbox-model-parity
Nov 15, 2026
Merged

t3-code-sandboxes[bot] merged 4 commits into
feat/sandbox-environmentsfrom
fix/sandbox-model-parity

Conversation

@t3-code-sandboxes

Copy link
Copy Markdown

Stacked on #68.

Problem. In a sandbox chat, the model picker and the model and effort it sends didn't behave like a normal T3 chat:

  • While nothing had read the sandbox yet (connecting, host restarted, sandbox stopped), the picker showed "Sandbox agent" (the bridge's probe placeholder) or another sandbox chat's models.
  • A send in that state dropped the chat's effort, since the composer derived options against that list, and the bridge then pushed the stripped selection to the sandbox.
  • The bridge compared selections strictly, so [effort:high] and [effort:high, fastMode:false] counted as different, and a host pick that only omitted options removed them from the sandbox.
  • A bridge session opened before the sandbox answered could never switch models ("The active ACP session does not expose a model-switch capability.").
  • The model pick copied between the sandbox's thread and its host mirror failed silently.

Fix (sandbox code only; generic composer and provider logic are unchanged).

  • Until the sandbox is read, sandboxMirrorPickerSource lists exactly the mirror's own model, read-only. Each of the mirror's options becomes a one-choice control, so a send keeps them. Web and mobile both get this through client-runtime.
  • sandboxSelectionFor compares by meaning:
    • Host options win.
    • An option the host leaves out keeps the sandbox's value.
    • An option set to its default counts the same as an omitted one.
    • It returns null when the model and the effective options already match.
  • The sandbox bridge flavor sets modelOptionArrivesLate, as Kiro's does, because the bridge lists the sandbox's models only once the sandbox answers.
  • A failed partner write is logged with console.warn. The composer keeps the pick, so the next send carries it.

Test plan

  • sandboxMirror.test.ts: offers only the mirror's own model and options while neither has read the sandbox, and the composer's helpers keep [effort:xhigh, fastMode:true] (fails on the base)
  • bridge.test.ts: compares options by meaning and keeps the sandbox's for any the host leaves out (fails on the base)
  • AcpRegistryAdapterV2.test.ts: a bridge session opened with no model option still reports supportsModelSwitchInSession (fails on the base)
  • Typecheck of client-runtime, sandbox-bridge, provider-acp-registry, server, web and mobile. In check:changed, format, lint, knip and react compiler pass. Its test step fails only the 4 remote-parent cases, whose fixture lacks modelSelection; test: fix the tests that fail on the sandbox branch itself #69 fixes that fixture.

Claude Opus 5.5 via Claude Code.

🤖 Generated with Claude Code

OmarAlex24 and others added 4 commits November 15, 2026 19:24
…and keeps its effort

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…es out

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… switches models

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… reported

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Base automatically changed from fix/sandbox-mirror-working to feat/sandbox-environments November 15, 2026 21:15
@t3-code-sandboxes
t3-code-sandboxes Bot merged commit 47fba32 into feat/sandbox-environments Nov 15, 2026
@t3-code-sandboxes
t3-code-sandboxes Bot deleted the fix/sandbox-model-parity branch November 15, 2026 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant