Repository navigation
Conversation
…-code MCP server Both default to on, preserving current behavior. The Codex provider grows a Developer instructions switch (schema-driven, per instance) that gates the developer_instructions payload on Codex turns. Server settings grow an enableMcpServer toggle that gates MCP credential issuance in ProviderService, so agents are no longer offered the preview browser tools; it applies on the next session start without a server restart.
Owner
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
T3 Code injects its own context into every agent session with no way to opt out: Codex turns always get
developer_instructions(collaboration mode rules, the Plan mode contract, and preview browser guidance), and every provider session is offered the t3-code MCP server that exposes thepreview_*browser tools. Users who want providers to run closer to their native behavior have to fork the server.Fix
Two new settings, both defaulting to on (no behavior change unless toggled):
developer_instructionspayload inbuildCodexCollaborationMode, threaded through the existingmakeCodexAdapter(codexConfig)closure intoCodexSessionRuntimeOptions. The switch renders automatically from the schema-driven provider settings form.enableMcpServerserver setting. Gates credential issuance inProviderService.prepareMcpSession, so no adapter (Codex, Claude, Cursor, Grok) is offered the t3-code MCP server. It is read at session start, so toggling applies to the next session without a server restart, and turning it off revokes the thread's previously issued credential.Both patches flow through the existing generic
deepMergesettings patch path; no merge code was added. The relationship between the two is called out in each setting's description: the developer instructions reference the preview browser tools, so disabling the MCP server while leaving instructions on tells agents about tools that are not there.Surface walkthrough:
CodexSettings.injectDeveloperInstructionsandServerSettings.enableMcpServer, both with decoding defaults so older settings files and older clients decode unchanged.docs/user/providers-codex.mdfor the Developer instructions toggle. The MCP toggle's in-app description is its documentation.Verification
CodexSessionRuntime.test.ts(developer instructions omitted when injection disabled) andProviderService.test.ts(credential issued when enabled, withheld when disabled).vp test runon the five touched test files: 101 passed.tsgotypecheck for contracts/server/web andvp linton touched files: clean.settings.json(enableMcpServer: false,providerInstances.codex.config.injectDeveloperInstructions: false) and correct stripping back to defaults when re-enabled.Screenshots
— Kimi K3 via OpenCode