feat(server): add per-instance toggle for Codex developer instructions - #5
Open
hwanseoc wants to merge 1 commit into
Open
feat(server): add per-instance toggle for Codex developer instructions#5hwanseoc wants to merge 1 commit into
hwanseoc wants to merge 1 commit into
Conversation
Codex turns always carry T3 Code's developer_instructions payload (collaboration mode rules, the Plan mode contract, preview browser guidance, and runtime info). Add an injectDeveloperInstructions flag to CodexSettings, defaulting to on, and gate the payload on it. The schema-driven provider settings form renders the switch automatically. Turning it off removes the Plan mode rules with it; the setting's description says so.
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
Every Codex turn carries T3 Code's
developer_instructionspayload — collaboration mode rules, the Plan mode<proposed_plan>contract, preview browser guidance, and runtime info — with no way to opt out.Fix
New
injectDeveloperInstructionsflag onCodexSettings(default on, so no behavior change unless toggled). It rides the existing per-instance config path:makeCodexAdapter(codexConfig)→CodexSessionRuntimeOptions→buildTurnStartParams, which simply omits thedeveloper_instructionskey when the flag is off.No UI code: the schema-driven provider settings form renders the switch (Settings → Providers → Codex) from the field's
providerSettingsFormannotation. Mobile has no provider settings form; the setting is server-authoritative.Turning this off removes the Plan mode rules along with the rest of the payload — the setting's description and the new
docs/user/providers-codex.mdsection both say so.Verification
CodexSessionRuntime.test.tscase: developer instructions omitted when the flag is off, model/effort settings still present.vp test runon the four touched test files: 72 passed. Targetedtsgo(contracts, server) andvp lintclean.providerInstances.codex.config.injectDeveloperInstructions: falsepersists tosettings.json, and is stripped back to the default when re-enabled.Screenshots
— Kimi K3 via OpenCode