Skip to content

feat(settings): default agents to provider-native visual tools - #5381

Open
joshfcc wants to merge 4 commits into
pingdotgg:mainfrom
joshfcc:feat/provider-native-visual-tools
Open

feat(settings): default agents to provider-native visual tools#5381
joshfcc wants to merge 4 commits into
pingdotgg:mainfrom
joshfcc:feat/provider-native-visual-tools

Conversation

@joshfcc

@joshfcc joshfcc commented Aug 5, 2026

Copy link
Copy Markdown

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:

  • 7 focused test files, 202 tests passed
  • contracts, server, and web targeted typechecks passed
  • independent adversarial review passed after verifying the T3 Preview instruction output remains byte-equivalent to the previous behavior
  • no desktop packaging or updater paths changed

Before

General settings before the Agent visual tools control

After

General settings with Provider native and T3 Preview choices

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 persisted agentVisualToolsMode setting defaults to provider-native; t3-preview restores the prior behavior for new sessions only.

Server: ProviderService reads 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.) mount t3-code only when an MCP provider session exists.

Codex: T3 Preview routing text is appended to collaboration-mode instructions only when includeT3PreviewTools is true, detected via hasConfiguredT3CodeMcpServer (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

  • Adds a new agentVisualToolsMode server setting ('provider-native' | 't3-preview', default 'provider-native') in settings.ts.
  • When in 'provider-native' mode, ProviderService clears any stale MCP session and skips T3 Preview credential issuance; in 't3-preview' mode it issues credentials and mounts the MCP session as before.
  • Codex session turns include T3 Preview routing in developer_instructions only when the merged app-server args configure the t3-code MCP server, gated by the new hasConfiguredT3CodeMcpServer util in CodexSessionRuntime.ts.
  • Adds an "Agent visual tools" select control to the General settings panel so users can switch modes and restore the default.
  • Behavioral Change: agents that previously received T3 Preview routing instructions by default will now run provider-native unless the setting is explicitly switched to 't3-preview'.

Macroscope summarized 8a68a5b.

joshfcc and others added 3 commits August 4, 2026 23:01
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>
@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Aug 5, 2026
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4204f63a-8b45-4f3d-a475-5928cc3a7927

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Comment thread apps/server/src/provider/Layers/ProviderService.ts
Comment thread apps/server/src/provider/Layers/CodexSessionRuntime.ts Outdated
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>
@joshfcc
joshfcc marked this pull request as ready for review August 5, 2026 03:15
@macroscopeapp

macroscopeapp Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: 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.

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

Labels

size:L 100-499 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.

1 participant