feat(settings): default agents to provider-native visual tools - #5381
feat(settings): default agents to provider-native visual tools#5381joshfcc wants to merge 4 commits into
Conversation
Add a persisted Agent visual tools setting that hard-gates t3-code preview MCP issuance at ProviderService, keeps Codex preview routing tied to actual MCP mount state, and documents that the change applies to newly started sessions. Co-authored-by: Cursor <cursoragent@cursor.com>
Keep the provider-native MCP gate mock typed as an optional credential and gate Codex preview instructions on mcp_servers.t3-code only, leaving the broader MCP predicate for catalog reload behavior. Co-authored-by: Cursor <cursoragent@cursor.com>
Replace first-match string substitution with lastIndexOf so Default mode keeps its inline collaboration-mode reference intact and T3 Preview routing lands immediately before the real closing tag. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Provider-native session start now revokes leftover t3-code credentials for the thread, and Codex Preview instructions key off the merged app-server args so launch-arg MCP mounts are detected correctly. Co-authored-by: Cursor <cursoragent@cursor.com>
ApprovabilityVerdict: Needs human review This PR introduces a new user-configurable feature that controls which visual tools (provider-native vs T3 Preview MCP) agent sessions receive. New features affecting agent capabilities and session configuration warrant human review. You can customize Macroscope's approvability policy. Learn more. |
T3 currently mounts its Preview MCP server into provider sessions and injects Preview-first Codex instructions unconditionally. That prevents users from reliably choosing Codex, Claude, or another provider's native visual tools.
This adds a persisted Agent visual tools setting that defaults to Provider native. The server gates Preview credentials once before adapter dispatch, covering Codex, Claude, Cursor, Grok, and OpenCode; explicitly selecting T3 Preview restores the existing MCP mounts and Codex collaborative-browser instructions. The setting is available in General Settings, applies to newly started sessions, and is documented for Codex and Claude.
Verification:
Before
After
Built with GPT-5.6 Sol in the Codex harness, with Cursor Grok implementation assistance and Claude Opus adversarial review.
Note
Medium Risk
Changes provider session startup, MCP credential lifecycle, and Codex system instructions; mitigated by defaulting to provider-native, fail-closed settings reads, and clearing stale MCP state.
Overview
Newly started provider sessions no longer always get the T3 Preview (
t3-code) MCP server and Codex collaborative-browser developer instructions. A persistedagentVisualToolsModesetting defaults toprovider-native;t3-previewrestores the prior behavior for new sessions only.Server:
ProviderServicereads the setting before issuing MCP credentials—fail-closed to provider-native if settings cannot be loaded. In provider-native mode it skips credential issuance and revokes/clears stale MCP state so threads do not inherit preview tools. Adapters (Claude, Codex, etc.) mountt3-codeonly when an MCP provider session exists.Codex: T3 Preview routing text is appended to collaboration-mode instructions only when
includeT3PreviewToolsis true, detected viahasConfiguredT3CodeMcpServer(not generic MCP args). Base plan/default instruction exports stay preview-free.Product: General settings UI, search catalog, contract schema/defaults, and Codex/Claude user docs describe the control and that already-running sessions are unaffected.
Reviewed by Cursor Bugbot for commit 8a68a5b. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Default agents to provider-native visual tools with a settings toggle for T3 Preview mode
agentVisualToolsModeserver setting ('provider-native'|'t3-preview', default'provider-native') in settings.ts.'provider-native'mode,ProviderServiceclears any stale MCP session and skips T3 Preview credential issuance; in't3-preview'mode it issues credentials and mounts the MCP session as before.developer_instructionsonly when the merged app-server args configure thet3-codeMCP server, gated by the newhasConfiguredT3CodeMcpServerutil in CodexSessionRuntime.ts.'t3-preview'.Macroscope summarized 8a68a5b.