diff --git a/src/gateway/gateway-codex-harness.live-helpers.test.ts b/src/gateway/gateway-codex-harness.live-helpers.test.ts index 5e705647290..f06e2914964 100644 --- a/src/gateway/gateway-codex-harness.live-helpers.test.ts +++ b/src/gateway/gateway-codex-harness.live-helpers.test.ts @@ -37,6 +37,13 @@ describe("gateway codex harness live helpers", () => { expect(isExpectedCodexStatusCommandText(text)).toBe(true); }); + it("accepts current app-server status prose with session-is wording", () => { + const text = + "Status: running on `openai/gpt-5.5`, context at 22k/272k tokens (8%), no compactions. Session is `agent:dev:live-codex-harness`; execution is direct with elevated mode."; + + expect(isExpectedCodexStatusCommandText(text)).toBe(true); + }); + it("accepts the current status card emitted by OpenAI Codex", () => { const text = [ "Current session status:", diff --git a/src/gateway/gateway-codex-harness.live-helpers.ts b/src/gateway/gateway-codex-harness.live-helpers.ts index 07c4ce2bfc6..265bbbea61c 100644 --- a/src/gateway/gateway-codex-harness.live-helpers.ts +++ b/src/gateway/gateway-codex-harness.live-helpers.ts @@ -94,6 +94,8 @@ export function isExpectedCodexStatusCommandText(text: string): boolean { const mentionsHarnessSession = normalized.includes("session: `agent:dev:live-codex-harness`") || normalized.includes("session: agent:dev:live-codex-harness") || + normalized.includes("session is `agent:dev:live-codex-harness`") || + normalized.includes("session is agent:dev:live-codex-harness") || normalized.includes("session `agent:dev:live-codex-harness`") || normalized.includes("current session is `agent:dev:live-codex-harness`") || normalized.includes("current session is agent:dev:live-codex-harness") ||