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
Copy file name to clipboardExpand all lines: apps/server/src/provider/CodexDeveloperInstructions.ts
+26-6Lines changed: 26 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,19 @@ For browser work, first call \`preview_status\`. If no automation-capable previe
11
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.
12
12
`;
13
13
14
-
exportconstCODEX_PLAN_MODE_DEVELOPER_INSTRUCTIONS=`<collaboration_mode># Plan Mode (Conversational)
14
+
/**
15
+
* The browser block is omitted entirely when the preview tools aren't attached.
16
+
* Describing `preview_*` tools that aren't in the turn's tool list would be
17
+
* worse than saying nothing: the instructions actively steer the model away
18
+
* from Playwright and agent-browser, so leaving them in would talk it out of
): string=>`<collaboration_mode># Plan Mode (Conversational)
15
27
16
28
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.
17
29
@@ -139,10 +151,12 @@ Do not ask "should I proceed?" in the final output. The user can easily switch o
139
151
Only produce at most one \`<proposed_plan>\` block per turn, and only when you are presenting a complete spec.
140
152
141
153
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.
148
162
@@ -153,7 +167,7 @@ Your active mode changes only when new developer instructions with a different \
153
167
Use the \`request_user_input\` tool only when it is listed in the available tools for this turn.
154
168
155
169
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.
156
-
${T3_CODE_BROWSER_TOOL_INSTRUCTIONS}
170
+
${browserToolInstructions(browserToolsAvailable)}
157
171
</collaboration_mode>`;
158
172
159
173
exportinterfaceCodexRuntimeInfo{
@@ -169,11 +183,17 @@ function toSingleLine(value: string): string {
169
183
exportfunctionbuildCodexDeveloperInstructions(
170
184
interactionMode: ProviderInteractionMode,
171
185
runtime: CodexRuntimeInfo,
186
+
/**
187
+
* Whether the `t3-code` MCP server is attached to this turn. Callers derive
188
+
* it from the session's actual MCP configuration rather than re-reading the
189
+
* setting, so the prompt cannot claim tools the turn doesn't have.
<runtime_info>In case you're asked: you are running in T3 Code through the Codex harness, as ${toSingleLine(runtime.model)} with ${toSingleLine(runtime.reasoningEffort)} reasoning effort. No need to mention this otherwise.</runtime_info>`;
0 commit comments