Skip to content

Commit 8b1b982

Browse files
committed
Update Codex prompt binding tests.
1 parent e4579fe commit 8b1b982

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

pc/src/bridge/CodexChatClient.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import test from "node:test";
66
import type { AgentRequestOptions, AgentRunResult, AgentStatusSink } from "../dispatcher/AgentClient.js";
77
import { normalizeCodexUsage } from "../dispatcher/CodexAppServerClient.js";
88
import type { CodexAppServerClient } from "../dispatcher/CodexAppServerClient.js";
9+
import { PHONE_AGENT_SYSTEM_PROMPT } from "../dispatcher/promptPolicy.js";
910
import type { ChatAttachment } from "../protocol/messages.js";
1011
import { CODEX_WORKSPACE_NOT_FOUND_CODE } from "./chat/ChatErrors.js";
1112
import { CodexChatClient } from "./CodexChatClient.js";
@@ -92,7 +93,7 @@ test("Codex new sessions create and reuse app-server threads", async () => {
9293
assert.equal(created.key, "codex:019e0000-0000-7000-8000-000000000001");
9394
assert.equal(created.sessionId, "019e0000-0000-7000-8000-000000000001");
9495
assert.equal(fake.createdThreads[0]?.model, "gpt-5.3-codex");
95-
assert.match(fake.createdThreads[0]?.baseInstructions ?? "", /android-control skill/);
96+
assert.equal(fake.createdThreads[0]?.baseInstructions, PHONE_AGENT_SYSTEM_PROMPT);
9697

9798
await client.sendChat({
9899
sessionKey: created.key!,
@@ -218,7 +219,7 @@ test("Codex sends from implicit sessions create a durable thread first", async (
218219
await waitFor(() => fake.submitted.length === 1);
219220

220221
assert.equal(fake.createdThreads.length, 1);
221-
assert.match(fake.createdThreads[0]?.baseInstructions ?? "", /android-control skill/);
222+
assert.equal(fake.createdThreads[0]?.baseInstructions, PHONE_AGENT_SYSTEM_PROMPT);
222223
assert.equal(fake.submitted[0]?.options.threadId, "019e0000-0000-7000-8000-000000000001");
223224
assert.equal(fake.submitted[0]?.options.useSessionInstructions, true);
224225
assert.equal(fake.submitted[0]?.text, "Hello");

0 commit comments

Comments
 (0)