You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 355ca7d
Browse filesBrowse the repository at this point in the historyBrowse files
fix(server): Codex turns reach newer models with T3 Code's instructions again
Newer Codex model catalogs ship their own collaboration mode text, and
Codex uses it instead of the client's developer_instructions. That dropped
T3 Code's runtime info, PR linking, and browser/device tool guidance.
Send that context through turn/start additionalContext instead, and keep
only the mode prompt in the collaboration mode.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
constT3_CODE_BROWSER_TOOL_INSTRUCTIONS=`## T3 Code collaborative browser
7
6
8
7
You are running inside T3 Code. The \`t3-code\` MCP server is the product-native collaborative browser shared with the user. When it exposes \`preview_*\` tools, prefer those tools for browser navigation, inspection, interaction, screenshots, and recordings.
9
8
10
9
For browser work, first call \`preview_status\`. If no automation-capable preview is attached, call \`preview_open\` before concluding that the browser is unavailable. Then use \`preview_navigate\`, \`preview_snapshot\`, and the focused interaction tools. Prefer snapshot-provided locators over coordinates.
11
10
12
-
Do not switch to global browser skills, Chrome, Node REPL browser automation, standalone Playwright, or agent-browser merely because the preview is initially closed or a first call fails. Use an alternative browser system only when the T3 preview tools are absent, the user explicitly requests another browser, or \`preview_open\` returns an explicit unsupported/unavailable error. A failed T3 preview tool call should be inspected and retried with corrected arguments when the error is actionable.
13
-
`;
14
-
15
-
constT3_CODE_DEVICE_TOOL_INSTRUCTIONS=`
11
+
Do not switch to global browser skills, Chrome, Node REPL browser automation, standalone Playwright, or agent-browser merely because the preview is initially closed or a first call fails. Use an alternative browser system only when the T3 preview tools are absent, the user explicitly requests another browser, or \`preview_open\` returns an explicit unsupported/unavailable error. A failed T3 preview tool call should be inspected and retried with corrected arguments when the error is actionable.`;
16
12
17
-
## T3 Code devices
13
+
constT3_CODE_DEVICE_TOOL_INSTRUCTIONS=`## T3 Code devices
18
14
19
-
The \`t3-code\` MCP server also exposes \`device_*\` tools for iOS Simulators and Android Emulators on this environment. For mobile verification, call \`device_list\`, then \`device_open\` so the user can watch the device in their Device panel; its result explains how to drive the device. Driving happens through the \`agent-device\` CLI, which is on PATH. Keep the host config and session flags returned by \`device_open\` on every command so concurrent devices stay independent: prefer \`agent-device snapshot -i\` refs over coordinates, and use \`device_screenshot\` when you need to see the screen. Do not call simctl, adb, xcrun, or serve-sim directly while these tools are present. If \`device_list\` reports a platform as unavailable, say so instead of trying another route.
20
-
`;
15
+
The \`t3-code\` MCP server also exposes \`device_*\` tools for iOS Simulators and Android Emulators on this environment. For mobile verification, call \`device_list\`, then \`device_open\` so the user can watch the device in their Device panel; its result explains how to drive the device. Driving happens through the \`agent-device\` CLI, which is on PATH. Keep the host config and session flags returned by \`device_open\` on every command so concurrent devices stay independent: prefer \`agent-device snapshot -i\` refs over coordinates, and use \`device_screenshot\` when you need to see the screen. Do not call simctl, adb, xcrun, or serve-sim directly while these tools are present. If \`device_list\` reports a platform as unavailable, say so instead of trying another route.`;
): string=>`<collaboration_mode># Plan Mode (Conversational)
44
+
constCODEX_PLAN_MODE_DEVELOPER_INSTRUCTIONS=`<collaboration_mode># Plan Mode (Conversational)
49
45
50
46
You work in 3 phases, and you should *chat your way* to a great plan before finalizing it. A great plan is very detailed-intent- and implementation-wise-so that it can be handed to another engineer or agent to be implemented right away. It must be **decision complete**, where the implementer does not need to make any decisions.
51
47
@@ -173,12 +169,9 @@ Do not ask "should I proceed?" in the final output. The user can easily switch o
173
169
Only produce at most one \`<proposed_plan>\` block per turn, and only when you are presenting a complete spec.
174
170
175
171
If the user stays in Plan mode and asks for revisions after a prior \`<proposed_plan>\`, any new \`<proposed_plan>\` must be a complete replacement. If the user indicates that the prior plan is not acceptable but does not provide enough information to produce a complete replacement, address the concern and continue planning without producing a \`<proposed_plan>\` block. If the follow-up neither requires changes nor calls the plan into question (e.g. clarifying question), answer it before the block, then reproduce the prior \`<proposed_plan>\` unchanged.
You are now in Default mode. Any previous instructions for other modes (e.g. Plan mode) are no longer active.
184
177
@@ -189,29 +182,45 @@ Your active mode changes only when new developer instructions with a different \
189
182
Use the \`request_user_input\` tool only when it is listed in the available tools for this turn.
190
183
191
184
In Default mode, strongly prefer making reasonable assumptions and executing the user's request rather than stopping to ask questions. If you absolutely must ask a question because the answer cannot be discovered from local context and a reasonable assumption would be risky, ask the user directly with a concise plain-text question. Never write a multiple choice question as a textual assistant message.
192
-
${browserToolInstructions(browserToolsAvailable)}
193
185
</collaboration_mode>`;
194
186
195
187
exportinterfaceCodexRuntimeInfo{
196
188
readonlymodel: string;
197
189
readonlyreasoningEffort: string;
198
190
}
199
191
200
-
exportfunctionbuildCodexDeveloperInstructions(
201
-
interactionMode: ProviderInteractionMode,
192
+
/** Mode prompt for `turn/start.collaborationMode.settings.developer_instructions`. */
0 commit comments