Skip to content

Commit 31ed93f

Browse files
committed
test(codex): accept current status prose
1 parent 23e0be3 commit 31ed93f

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

src/gateway/gateway-codex-harness.live-helpers.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,13 @@ describe("gateway codex harness live helpers", () => {
6161
expect(isExpectedCodexStatusCommandText(text)).toBe(true);
6262
});
6363

64+
it("accepts running-session status prose emitted by current codex", () => {
65+
const text =
66+
"Session is running on `codex/gpt-5.5` with low reasoning, direct execution, and about `24k/272k` context used. Cache hit is `99%`; no compactions so far.";
67+
68+
expect(isExpectedCodexStatusCommandText(text)).toBe(true);
69+
});
70+
6471
it("accepts the current status card emitted by OpenAI Codex", () => {
6572
const text = [
6673
"Current session status:",

src/gateway/gateway-codex-harness.live-helpers.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,17 @@ export function isExpectedCodexStatusCommandText(text: string): boolean {
122122
normalized.includes("session status: running on") &&
123123
normalized.includes("context at") &&
124124
mentionsModel;
125+
const isRunningSessionStatus =
126+
normalized.includes("session is running on") &&
127+
normalized.includes("context used") &&
128+
normalized.includes("cache hit") &&
129+
normalized.includes("no compactions") &&
130+
mentionsModel;
125131

126132
return (
127133
isCurrentSessionStatus ||
128134
isCompactSessionStatus ||
135+
isRunningSessionStatus ||
129136
(mentionsOpenClawStatus && mentionsHarnessSession && mentionsModel)
130137
);
131138
}

0 commit comments

Comments
 (0)