@devries-cameron20 / t3code-1 / commits / df370c31d2
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

test(server): exercise Codex prompts through public assembly (#10045)

Julius Marminge committed Sep 5, 2026 at 01:29 UTC df370c31d26afc72ace55263e746ba4386dada25
2 files changed +11 -18
apps/server/src/provider/CodexDeveloperInstructions.ts
+2 -2
@@ -22,7 +22,7 @@ Do not switch to global browser skills, Chrome, Node REPL browser automation, st
22 const browserToolInstructions = (browserToolsAvailable: boolean): string =>
23 browserToolsAvailable ? T3_CODE_BROWSER_TOOL_INSTRUCTIONS : "";
24
25 -export const codexPlanModeDeveloperInstructions = (
25 +const codexPlanModeDeveloperInstructions = (
26 browserToolsAvailable: boolean,
27 ): string => `<collaboration_mode># Plan Mode (Conversational)
28
@@ -155,7 +155,7 @@ If the user stays in Plan mode and asks for revisions after a prior \`<proposed_
155 ${browserToolInstructions(browserToolsAvailable)}
156 </collaboration_mode>`;
157
158 -export const codexDefaultModeDeveloperInstructions = (
158 +const codexDefaultModeDeveloperInstructions = (
159 browserToolsAvailable: boolean,
160 ): string => `<collaboration_mode># Collaboration Mode: Default
161
apps/server/src/provider/Layers/CodexSessionRuntime.test.ts
+9 -16
@@ -9,11 +9,7 @@ import * as CodexErrors from "effect-codex-app-server/errors";
9 import * as CodexRpc from "effect-codex-app-server/rpc";
10 import * as EffectCodexSchema from "effect-codex-app-server/schema";
11
12 -import {
13 - buildCodexDeveloperInstructions,
14 - codexDefaultModeDeveloperInstructions,
15 - codexPlanModeDeveloperInstructions,
16 -} from "../CodexDeveloperInstructions.ts";
12 +import { buildCodexDeveloperInstructions } from "../CodexDeveloperInstructions.ts";
13 import { codexSessionAppServerArgs } from "./codexLaunchArgs.ts";
14 import {
15 buildTurnStartParams,
@@ -459,7 +455,7 @@ describe("buildCodexDeveloperInstructions", () => {
455 reasoningEffort: "high",
456 });
457
462 - NodeAssert.ok(instructions.startsWith(codexDefaultModeDeveloperInstructions(true)));
458 + NodeAssert.match(instructions, /^<collaboration_mode># Collaboration Mode: Default/);
459 NodeAssert.match(instructions, /T3 Code/);
460 NodeAssert.match(instructions, /Codex harness/);
461 NodeAssert.match(instructions, /as gpt-5\.3-codex with high reasoning effort/);
@@ -484,7 +480,7 @@ describe("buildCodexDeveloperInstructions", () => {
480 reasoningEffort: "medium",
481 });
482
487 - NodeAssert.ok(instructions.startsWith(codexPlanModeDeveloperInstructions(true)));
483 + NodeAssert.match(instructions, /^<collaboration_mode># Plan Mode/);
484 NodeAssert.match(instructions, /as gpt-5\.3-codex with medium reasoning effort/);
485 });
486
@@ -513,11 +509,11 @@ describe("buildCodexDeveloperInstructions", () => {
509 });
510
511 describe("T3 browser developer instructions", () => {
512 + const runtime = { model: "gpt-5.3-codex", reasoningEffort: "high" };
513 +
514 it("prefers the product-native preview tools in both collaboration modes", () => {
517 - for (const instructions of [
518 - codexDefaultModeDeveloperInstructions(true),
519 - codexPlanModeDeveloperInstructions(true),
520 - ]) {
515 + for (const mode of ["default", "plan"] as const) {
516 + const instructions = buildCodexDeveloperInstructions(mode, runtime, true);
517 NodeAssert.match(instructions, /t3-code/);
518 NodeAssert.match(instructions, /preview_status/);
519 NodeAssert.match(instructions, /preview_open/);
@@ -526,10 +522,8 @@ describe("T3 browser developer instructions", () => {
522 });
523
524 it("omits the browser block entirely when the preview tools are not attached", () => {
529 - for (const instructions of [
530 - codexDefaultModeDeveloperInstructions(false),
531 - codexPlanModeDeveloperInstructions(false),
532 - ]) {
525 + for (const mode of ["default", "plan"] as const) {
526 + const instructions = buildCodexDeveloperInstructions(mode, runtime, false);
527 NodeAssert.doesNotMatch(instructions, /preview_status/);
528 NodeAssert.doesNotMatch(instructions, /preview_open/);
529 NodeAssert.doesNotMatch(instructions, /T3 Code collaborative browser/);
@@ -543,7 +537,6 @@ describe("T3 browser developer instructions", () => {
537 });
538
539 it("tracks the turn's MCP configuration rather than defaulting to on", () => {
546 - const runtime = { model: "gpt-5.3-codex", reasoningEffort: "high" };
540 NodeAssert.match(buildCodexDeveloperInstructions("default", runtime, true), /preview_open/);
541 NodeAssert.doesNotMatch(
542 buildCodexDeveloperInstructions("default", runtime, false),