diff --git a/.oxfmtrc.json b/.oxfmtrc.json index 0a6625f6fe7..19856d6ca84 100644 --- a/.oxfmtrc.json +++ b/.oxfmtrc.json @@ -8,6 +8,7 @@ "cloud/**", "resources/licenses/**", ".github/actions/cloud-sql-rollout-lease/**", - ".anti-slop-plugin/**" + ".anti-slop-plugin/**", + "src/main/runtime/__fixtures__/*.timing.json" ] } diff --git a/src/main/daemon/serialize-grid-transcript-replay.test.ts b/src/main/daemon/serialize-grid-transcript-replay.test.ts index dca03b69a05..298aaa681bf 100644 --- a/src/main/daemon/serialize-grid-transcript-replay.test.ts +++ b/src/main/daemon/serialize-grid-transcript-replay.test.ts @@ -43,6 +43,11 @@ const KNOWN_PREEXISTING_I2_FAILURES: Record = { 'codex-0157-effort-override-embedded-warning': 4, 'codex-0157-no-daemon-effort-override': 16, 'codex-0157-plain-ready': 18, + // Same extra dim bit on the 0.157/0.158 header row (STA-8834 fixtures). + 'codex-0-157-1-update-dialog': 16, + 'codex-0-158-0-approval': 12, + 'codex-0-158-0-timed-turn': 20, + 'codex-0-158-0-trustprompt': 36, 'claude-dialog-trust-workspace-answered': 13, // DSH-TUI's whale intro paints whole rows of 24-bit background, and every one of this // transcript's divergences is the same shape: `visible-grid row=0`, a true-colour diff --git a/src/main/runtime/__fixtures__/codex-0-150-1-turn.meta.json b/src/main/runtime/__fixtures__/codex-0-150-1-turn.meta.json new file mode 100644 index 00000000000..21b39d7625b --- /dev/null +++ b/src/main/runtime/__fixtures__/codex-0-150-1-turn.meta.json @@ -0,0 +1,16 @@ +{ + "capturedAt": "2026-09-29T01:35:32.695Z", + "platform": "darwin", + "command": [ + "codex", + "-c", + "check_for_update_on_startup=false", + "--dangerously-bypass-approvals-and-sandbox", + "-m", + "gpt-5.6-sol" + ], + "cols": 120, + "rows": 40, + "note": "codex-cli 0.150.1: launch, one short turn, settled idle after it. STA-8834.", + "exitCode": 0 +} diff --git a/src/main/runtime/__fixtures__/codex-0-150-1-turn.txt b/src/main/runtime/__fixtures__/codex-0-150-1-turn.txt new file mode 100644 index 00000000000..4d4c5dacccf --- /dev/null +++ b/src/main/runtime/__fixtures__/codex-0-150-1-turn.txt @@ -0,0 +1,18 @@ +[?2004h[>4;0m[>7u[?1004h]10;?\]11;?\[?u[?2026h╭───────────────────────────────────────╮│ >_ OpenAI Codex (v0.150.1) ││ ││ model: loading /model to change ││ directory: loading │╰───────────────────────────────────────╯  › Ask Codex to do anything  ? for shortcuts[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h╭──────────────────────────────────────────────────╮│ >_ OpenAI Codex (v0.150.1) ││ ││ model: loading /model to change ││ directory: ~/orca-lanes/sta8834/corpus/scratch ││ permissions: YOLO mode │╰──────────────────────────────────────────────────╯  › Ask Codex to do anything  ? for shortcuts[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;scratch[?2026h[0 q[?25h[?2026l[?2026hgpt-5.6-sol default · ~/orca-lanes/sta8834/corpus/scratch[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;⠋ scratch]0;⠙ scratch[?2026hMMMMMMMMM +╭────────────────────────────────────────────────────╮ +│ >_ OpenAI Codex (v0.150.1) │ +│ │ +│ model: gpt-5.6-sol medium /model to change │ +│ directory: ~/orca-lanes/sta8834/corpus/scratch │ +│ permissions: YOLO mode │ +╰────────────────────────────────────────────────────╯ + + Tip: Try the Desktop app. Run 'codex app' or visit https://chatgpt.com/codex?app-landing-page=true • Booting MCP server: node_repl (0s • esc to interrupt)  › Ask Codex to do anything  gpt-5.6-sol medium · ~/orca-lanes/sta8834/corpus/scratch[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;scratch[?2026h  › Ask Codex to do anything  gpt-5.6-sol medium · ~/orca-lanes/sta8834/corpus/scratch[0 q[?25h[?2026l[?2026hMM + +• You have 3 usage limit resets available. Run /usage to use one.[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026hReply with the single wordOK.[0 q[?25h[?2026l[?2026hMMMM + + +› Reply with the single word OK. +Ask Codex to do anything[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;⠋ scratch[?2026h • Working (0s • esc to interrupt)  › Ask Codex to do anything  gpt-5.6-sol medium · ~/orca-lanes/sta8834/corpus/scratch[0 q[?25h[?2026l]0;⠙ scratch[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;⠹ scratch[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;⠸ scratch[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;⠼ scratch[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;⠴ scratch[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026hW[0 q[?25h[?2026l]0;⠦ scratch[?2026h[0 q[?25h[?2026l[?2026hWo[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;⠧ scratch[?2026h•Wor[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;⠇ scratch[?2026h•Work[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h•Worki[0 q[?25h[?2026l]0;⠏ scratch[?2026h[0 q[?25h[?2026l[?2026hWorkin[0 q[?25h[?2026l[?2026h•[0 q[?25h[?2026l]0;⠋ scratch[?2026hWorking[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h•Working1[0 q[?25h[?2026l]0;⠙ scratch[?2026h[0 q[?25h[?2026l[?2026hWorking[0 q[?25h[?2026l[?2026h•[0 q[?25h[?2026l]0;⠹ scratch[?2026h[0 q[?25h[?2026l[?2026hWorking[0 q[?25h[?2026l[?2026h•[0 q[?25h[?2026l]0;⠸ scratch[?2026horking[0 q[?25h[?2026l[?2026h•[0 q[?25h[?2026l[?2026hrking[0 q[?25h[?2026l]0;⠼ scratch[?2026h[0 q[?25h[?2026l[?2026h•king[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;⠴ scratch[?2026hing[0 q[?25h[?2026l[?2026h•[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;⠦ scratch[?2026hng[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;⠧ scratch[?2026hg[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;⠇ scratch[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;⠏ scratch[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;⠋ scratch[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;⠙ scratch[?2026h2[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;⠹ scratch[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;⠸ scratch[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;⠼ scratch[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;⠴ scratch[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026hW[0 q[?25h[?2026l]0;⠦ scratch[?2026h[0 q[?25h[?2026l[?2026hWo[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;⠧ scratch[?2026h•Wor[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;⠇ scratch[?2026h•Work[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h•Worki[0 q[?25h[?2026l]0;⠏ scratch[?2026h[0 q[?25h[?2026l[?2026hWorkin[0 q[?25h[?2026l[?2026h•[0 q[?25h[?2026l]0;⠋ scratch[?2026hWorking[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h•Working3[0 q[?25h[?2026l]0;⠙ scratch[?2026h[0 q[?25h[?2026l[?2026hWorking[0 q[?25h[?2026l[?2026h•[0 q[?25h[?2026l]0;⠹ scratch[?2026h[0 q[?25h[?2026l[?2026hWorking[0 q[?25h[?2026l[?2026h•[0 q[?25h[?2026l]0;⠸ scratch[?2026horking[0 q[?25h[?2026l[?2026h•[0 q[?25h[?2026l[?2026hrking[0 q[?25h[?2026l]0;⠼ scratch[?2026h[0 q[?25h[?2026l[?2026h•king[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;⠴ scratch[?2026hing[0 q[?25h[?2026l[?2026h•[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;⠦ scratch[?2026hng[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026hg[0 q[?25h[?2026l]0;⠧ scratch[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;⠇ scratch[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;⠏ scratch[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;⠋ scratch[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;⠙ scratch[?2026h4[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;⠹ scratch[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;⠸ scratch[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;⠼ scratch[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;⠴ scratch[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026hW[0 q[?25h[?2026l]0;⠦ scratch[?2026h[0 q[?25h[?2026l[?2026hWo[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;⠧ scratch[?2026h•Wor[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;⠇ scratch[?2026h•Work[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026hWorki[0 q[?25h[?2026l]0;⠏ scratch[?2026h•[0 q[?25h[?2026l[?2026hWorkin[0 q[?25h[?2026l[?2026h•[0 q[?25h[?2026l]0;⠋ scratch[?2026hWorking[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h•[0 q[?25h[?2026l]0;⠙ scratch[?2026hWorking5[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h•Working[0 q[?25h[?2026l]0;⠹ scratch[?2026h[0 q[?25h[?2026l[?2026hWorking[0 q[?25h[?2026l[?2026h•[0 q[?25h[?2026l]0;⠸ scratch[?2026horking[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h•rking[0 q[?25h[?2026l]0;⠼ scratch[?2026h[0 q[?25h[?2026l[?2026h•king[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;⠴ scratch[?2026h[0 q[?25h[?2026l[?2026h•ing[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;⠦ scratch[?2026hng[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026hg[0 q[?25h[?2026l]0;⠧ scratch[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;⠇ scratch[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;⠏ scratch[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;⠋ scratch[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h6[0 q[?25h[?2026l]0;⠙ scratch[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;⠹ scratch[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;⠸ scratch[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;⠼ scratch[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;⠴ scratch[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026hW[0 q[?25h[?2026l]0;⠦ scratch[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026hWo[0 q[?25h[?2026l]0;⠧ scratch[?2026h•[0 q[?25h[?2026l[?2026hWor[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;⠇ scratch[?2026h•Work[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l[?2026hMM + +• OK  › Ask Codex to do anything  gpt-5.6-sol medium · ~/orca-lanes/sta8834/corpus/scratch[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;⠏ scratch[?2026h[0 q[?25h[?2026l[?2026h[0 q[?25h[?2026l]0;scratch[?2026h[0 q[?25h[?2026l \ No newline at end of file diff --git a/src/main/runtime/__fixtures__/codex-0-155-1-timed-turn.meta.json b/src/main/runtime/__fixtures__/codex-0-155-1-timed-turn.meta.json new file mode 100644 index 00000000000..ca6db1a3254 --- /dev/null +++ b/src/main/runtime/__fixtures__/codex-0-155-1-timed-turn.meta.json @@ -0,0 +1,14 @@ +{ + "capturedAt": "2026-09-29T01:44:01.149Z", + "platform": "darwin", + "command": [ + "codex", + "-c", + "check_for_update_on_startup=false", + "--dangerously-bypass-approvals-and-sandbox" + ], + "cols": 120, + "rows": 40, + "note": "codex-cli 0.155.1, default tui animations. One tool-using turn sent once the composer had been quiet 2.5s; cut 20s past the last busy frame, before exit. .timing.json holds each PTY chunk as [ms since spawn, UTF-16 length] and the prompt-submit time. STA-8834.", + "exitCode": 0 +} diff --git a/src/main/runtime/__fixtures__/codex-0-155-1-timed-turn.timing.json b/src/main/runtime/__fixtures__/codex-0-155-1-timed-turn.timing.json new file mode 100644 index 00000000000..8258e899ce0 --- /dev/null +++ b/src/main/runtime/__fixtures__/codex-0-155-1-timed-turn.timing.json @@ -0,0 +1 @@ +{"promptSentAtMs":4478.2,"chunks":[[63.6,8],[63.7,47],[164.3,17],[164.5,730],[164.6,8],[164.6,78],[164.8,78],[165.4,78],[171.5,78],[172.5,78],[174.7,17],[174.8,794],[174.9,132],[175.2,79],[175.7,79],[197.3,79],[197.5,79],[203.1,79],[205.8,71],[205.8,8],[206,71],[206.2,87],[636.8,79],[641.5,79],[642.3,12],[642.6,202],[642.8,71],[642.9,8],[671.8,79],[728.1,14],[749.8,31],[749.8,767],[749.9,506],[750.9,77],[792.1,12],[793.2,77],[995.7,72],[995.7,178],[1340.2,77],[3899.1,153],[4478.5,104],[4478.5,94],[4478.6,160],[4483.3,77],[4488.7,77],[4510.6,14],[4511.7,18],[4511.9,509],[4545.3,14],[4545.4,77],[4579.4,77],[4613,77],[4646.2,14],[4646.3,77],[4679.2,77],[4712.4,77],[4721.2,77],[4732.5,77],[4741.8,77],[4755.1,14],[4755.2,77],[4756.4,30],[4763.7,132],[4798.3,77],[4831.8,77],[4865.3,30],[4865.4,77],[4898,77],[4931.8,77],[4965.6,30],[4965.7,77],[4998.3,77],[5032,77],[5066.6,30],[5066.7,77],[5100.6,111],[5134.7,77],[5168.8,30],[5168.8,77],[5202.5,111],[5235.8,77],[5269.8,30],[5269.9,77],[5304,111],[5338,77],[5372.6,30],[5372.7,111],[5406.4,77],[5440.5,77],[5474.5,30],[5474.6,111],[5508.1,77],[5542.1,30],[5542.2,82],[5542.2,8],[5576.7,111],[5610.9,77],[5645.1,30],[5645.3,77],[5678.4,111],[5712.5,77],[5745.7,30],[5745.9,77],[5779,111],[5812.7,77],[5845.4,30],[5845.6,111],[5879.6,77],[5913.5,77],[5945.9,30],[5946,111],[5980.4,77],[6014.5,77],[6048.6,30],[6048.7,77],[6082,77],[6116.5,77],[6150.1,30],[6150.2,77],[6183.5,77],[6217.5,77],[6251.7,30],[6252.1,77],[6285.1,77],[6318.6,77],[6352.7,30],[6352.9,77],[6386.1,77],[6425.6,77],[6459.8,30],[6460,77],[6493.6,77],[6527.3,90],[6561.3,30],[6561.4,77],[6594.4,77],[6627.4,77],[6661,30],[6661.2,77],[6695,77],[6729.1,77],[6763.1,30],[6763.2,77],[6797.2,77],[6831.3,77],[6865.4,30],[6865.5,77],[6898.9,77],[6933.1,77],[6967.1,30],[6967.2,77],[7001.2,77],[7035.3,77],[7068.9,30],[7069,77],[7102.2,111],[7136.6,77],[7169.9,30],[7170.3,77],[7204.3,111],[7238.4,77],[7272.3,30],[7272.3,77],[7305.3,111],[7339,77],[7373,30],[7373.2,111],[7407.1,77],[7441.1,77],[7474.7,30],[7474.9,111],[7508.5,77],[7542.6,30],[7542.8,90],[7576.9,111],[7610,77],[7644.6,30],[7644.7,77],[7679,111],[7712.9,77],[7746.6,30],[7746.8,77],[7779.2,111],[7813,77],[7847,30],[7847.1,111],[7881.2,77],[7915.3,77],[7949.3,30],[7949.4,111],[7982.8,77],[8016.8,77],[8050.1,30],[8050.1,29],[8050.1,48],[8083.8,77],[8117.9,77],[8151.5,30],[8151.5,77],[8185.7,77],[8219.4,77],[8252.2,30],[8252.3,77],[8286.4,77],[8320.4,77],[8354.4,30],[8354.5,77],[8388,77],[8422,77],[8456,30],[8456,77],[8490.2,77],[8524.5,90],[8558.4,30],[8558.6,77],[8592.8,77],[8626.1,77],[8659.8,30],[8660.1,77],[8694.5,77],[8727.9,77],[8761.8,30],[8762,77],[8796.8,77],[8830.8,77],[8864.1,30],[8864.3,77],[8897.6,77],[8931.7,77],[8965.2,30],[8965.3,77],[8999.4,77],[9032.6,77],[9066.7,30],[9066.8,77],[9101.1,111],[9135.1,77],[9169,30],[9169.2,77],[9202.6,111],[9236.7,77],[9270.7,30],[9270.8,77],[9305,111],[9339.3,77],[9373.7,30],[9373.9,111],[9407.8,77],[9441,77],[9474.5,30],[9474.6,111],[9507,77],[9540.9,90],[9574.4,30],[9574.5,111],[9608.6,77],[9642.6,30],[9642.7,77],[9676.7,111],[9710.9,77],[9744.2,30],[9744.2,77],[9778.4,111],[9812.5,77],[9846.5,30],[9846.6,111],[9880.7,77],[9914.9,77],[9948.5,30],[9948.6,111],[9982.6,77],[10015.9,77],[10049.2,30],[10049.2,77],[10082.8,69],[10082.8,8],[10116.3,77],[10149.7,30],[10149.8,77],[10183.7,77],[10218.2,77],[10251,30],[10251.1,77],[10284.1,77],[10317.7,77],[10352.3,30],[10352.3,69],[10352.4,8],[10386.5,77],[10420.5,77],[10454.8,30],[10455.1,77],[10488.6,77],[10521.9,90],[10555.8,30],[10556.1,77],[10590.5,77],[10624.7,77],[10658.7,30],[10658.9,77],[10692.4,69],[10692.5,8],[10726.2,77],[10760.1,30],[10760.2,77],[10794.4,77],[10828.5,77],[10861.6,30],[10861.8,77],[10894.7,77],[10928.6,77],[10962.6,30],[10962.8,77],[10995.4,77],[11029.6,77],[11063.4,30],[11063.5,77],[11097.3,111],[11131.7,77],[11165,30],[11165.1,77],[11199.2,111],[11233.1,77],[11266.3,30],[11266.4,77],[11299.6,111],[11333.2,77],[11367.2,30],[11367.3,77],[11401.5,111],[11435.5,77],[11469.4,30],[11469.5,111],[11503.6,77],[11537.7,90],[11571.7,30],[11571.8,111],[11606,77],[11639.6,77],[11672.8,30],[11672.9,111],[11695.8,77],[11730.1,77],[11764.1,30],[11764.2,111],[11798.4,77],[11832.2,77],[11864.9,30],[11865,111],[11898.6,77],[11932.3,77],[11966.4,30],[11966.5,97],[11966.5,14],[12000.2,77],[12033.5,77],[12067.5,30],[12067.6,77],[12101.2,77],[12135.4,69],[12135.5,8],[12168.8,30],[12168.9,69],[12169,8],[12203.1,77],[12237.2,77],[12270.6,30],[12270.8,63],[12270.8,14],[12304.9,77],[12339.7,77],[12373.6,30],[12373.8,77],[12406.9,77],[12441.1,77],[12475.2,30],[12475.4,77],[12509.1,77],[12543.1,30],[12543.4,90],[12577.4,77],[12611.4,77],[12644.6,30],[12644.8,77],[12678.6,77],[12712.7,77],[12746.3,30],[12746.4,77],[12779.6,77],[12812.5,77],[12846.1,30],[12846.2,77],[12880.3,77],[12914.3,77],[12948.3,30],[12948.4,77],[12982.7,77],[13016.9,77],[13049.9,30],[13050.1,77],[13083.6,111],[13117.1,77],[13151.1,30],[13151.2,77],[13184.2,111],[13217.4,77],[13250.7,30],[13250.8,77],[13284.9,111],[13301.8,77],[13336.6,77],[13370.1,30],[13370.1,111],[13403.8,77],[13438.1,77],[13472,30],[13472.2,111],[13505.2,77],[13539.6,90],[13572.7,30],[13572.8,111],[13607.6,77],[13641.8,77],[13675.5,30],[13675.6,111],[13709.7,77],[13742.2,30],[13742.3,63],[13742.3,14],[13776.5,111],[13810.3,77],[13844.3,30],[13844.6,77],[13877.7,111],[13911.7,77],[13944.4,30],[13944.6,111],[13978,77],[14012.1,77],[14046.6,30],[14046.8,77],[14080.9,77],[14115,77],[14148.5,30],[14148.7,63],[14148.7,14],[14182.8,77],[14217,77],[14250.6,30],[14250.7,77],[14284.9,77],[14319,77],[14353.5,30],[14353.5,77],[14387.7,77],[14421.9,77],[14456,30],[14456.2,77],[14490.3,77],[14523.9,119],[14558.3,30],[14558.3,77],[14592.5,77],[14626.6,77],[14660,30],[14660,77],[14694.1,77],[14728,77],[14761.6,30],[14761.6,69],[14761.7,8],[14771.2,73],[14771.3,192],[14805.5,77],[14839.7,77],[14873.5,30],[14873.7,77],[14907.8,77],[14941.4,77],[14974,30],[14974.1,77],[15007.3,77],[15040.5,77],[15074.5,30],[15074.6,77],[15106.9,111],[15140.6,77],[15172.8,30],[15172.9,77],[15180,14],[15182.8,41],[15183,177],[15192.7,77],[15226.5,77],[15260.2,41],[15260.2,77],[15294.3,111],[15328.5,77],[15361.7,41],[15361.9,63],[15362,14],[15395.9,111],[15429.6,77],[15463.6,41],[15463.8,77],[15496.8,111],[15531.1,90],[15565,41],[15565.2,111],[15599.4,77],[15632.9,77],[15666.2,41],[15666.4,111],[15700.3,77],[15734.5,77],[15768.5,41],[15768.6,111],[15802.6,77],[15835.4,77],[15869.2,41],[15869.3,111],[15903.2,77],[15935.8,77],[15969.9,41],[15970,111],[16003.5,77],[16037.5,77],[16071.6,41],[16071.8,77],[16105.7,77],[16138.7,77],[16172.9,41],[16172.9,77],[16207,77],[16241.4,77],[16275.4,41],[16275.4,69],[16275.5,8],[16309.6,77],[16343.6,41],[16343.8,77],[16377.8,77],[16411.9,77],[16445.8,41],[16445.9,77],[16480.1,77],[16513.3,90],[16547.1,41],[16547.2,77],[16580.9,77],[16615.2,77],[16648.6,41],[16648.7,77],[16682,77],[16715.1,77],[16748.6,41],[16748.7,77],[16781.9,77],[16816.1,77],[16850.1,41],[16850.2,77],[16884.8,77],[16919,77],[16952.9,41],[16953,77],[16987.7,77],[17021.1,77],[17054.5,41],[17054.5,69],[17054.6,8],[17088.6,103],[17088.7,8],[17122.5,77],[17155.9,41],[17156,77],[17190.1,111],[17224.3,77],[17258.3,41],[17258.4,69],[17258.4,8],[17292.3,111],[17326.3,77],[17360.7,41],[17360.8,77],[17395.7,111],[17429.9,77],[17463.9,41],[17464.1,77],[17498,111],[17531.3,90],[17564.9,41],[17565.1,111],[17599.1,77],[17633.1,77],[17666.7,41],[17666.7,111],[17700.9,77],[17734.8,77],[17768.8,41],[17768.9,103],[17769,8],[17803,77],[17837.1,77],[17871.1,41],[17871.1,111],[17904.8,77],[17939,77],[17973.1,41],[17973.2,111],[18006.8,77],[18040.7,77],[18074.5,41],[18074.5,63],[18074.5,14],[18108.6,77],[18142,41],[18142.1,77],[18175.5,77],[18209.1,69],[18209.2,8],[18242.3,41],[18242.4,77],[18276.6,77],[18310.2,77],[18344.2,41],[18344.3,77],[18378.4,77],[18412.6,77],[18446.6,41],[18446.7,77],[18479.9,69],[18479.9,8],[18513.5,90],[18546.9,41],[18547,77],[18576.3,77],[18609.3,77],[18642.9,41],[18643,77],[18677.1,77],[18711.2,77],[18744.2,41],[18744.3,77],[18777.3,77],[18787.6,18],[18787.8,759],[18797.1,77],[18813.8,77],[18823.3,77],[18856.4,41],[18856.4,77],[18890.3,77],[18924.4,77],[18958.4,41],[18958.5,77],[18992.4,77],[19026.6,77],[19060.6,41],[19060.7,77],[19094.9,111],[19129,77],[19162.9,41],[19163,69],[19163,8],[19197.1,111],[19231.5,77],[19264.7,41],[19264.9,69],[19265,8],[19299.2,111],[19332.9,77],[19366.9,41],[19367.1,29],[19367.1,48],[19401.3,111],[19435.4,77],[19469.5,41],[19469.6,63],[19469.6,48],[19503.8,77],[19537,90],[19571,41],[19571.1,111],[19605.3,77],[19639.3,77],[19672.5,41],[19672.5,111],[19716,77],[19746.1,41],[19746.1,77],[19779.7,111],[19813.8,77],[19847.7,41],[19847.7,97],[19847.8,14],[19881.8,77],[19916,77],[19950.1,41],[19950.1,103],[19950.2,8],[19984.4,77],[20018.7,77],[20052.7,41],[20052.9,77],[20087.2,77],[20121.5,77],[20155.6,41],[20155.8,69],[20155.8,8],[20189,77],[20223.5,77],[20257.4,41],[20257.6,63],[20257.6,14],[20291.2,69],[20291.3,8],[20324.7,77],[20358.1,41],[20358.2,77],[20392.4,77],[20426.5,77],[20460.6,41],[20460.7,77],[20494.8,77],[20528.9,90],[20562.9,41],[20563,77],[20597.2,77],[20630.5,77],[20664.6,41],[20664.7,77],[20699.5,77],[20733.6,77],[20766.9,41],[20767,77],[20800.2,77],[20834.6,77],[20867.8,41],[20868,77],[20901.6,77],[20935.6,77],[20968.8,41],[20969,29],[20969.1,48],[21003.3,69],[21003.4,8],[21037.4,77],[21071.4,41],[21071.6,69],[21071.6,8],[21105.8,111],[21139.9,77],[21174,41],[21174.1,77],[21207.6,111],[21218.4,77],[21251.8,41],[21251.9,77],[21286.2,111],[21320.1,77],[21354.2,41],[21354.3,63],[21354.3,14],[21388.7,111],[21422.8,77],[21456.1,41],[21456.2,77],[21490.3,111],[21524.4,90],[21558.6,41],[21558.9,77],[21593.2,111],[21627.5,77],[21661.5,41],[21661.6,63],[21661.6,48],[21695.9,77],[21730,77],[21763.4,41],[21763.4,103],[21763.5,8],[21797.6,77],[21831.4,77],[21865.4,41],[21865.4,97],[21865.4,14],[21899.6,77],[21933.7,77],[21967.8,41],[21967.8,111],[22002,77],[22036.1,77],[22070.2,41],[22070.2,29],[22070.3,48],[22104.2,77],[22138.5,77],[22171.9,41],[22172.1,77],[22206.3,77],[22240.6,77],[22273.1,41],[22273.2,77],[22307.3,77],[22341.1,77],[22375,41],[22375.1,69],[22375.1,8],[22409.4,77],[22443.5,41],[22443.6,63],[22443.7,14],[22477.9,77],[22511.2,90],[22544.7,41],[22544.8,77],[22579,77],[22612.5,77],[22646.4,41],[22646.5,77],[22679.8,77],[22713.9,77],[22748.5,41],[22748.6,69],[22748.6,8],[22782.7,77],[22817,77],[22850.2,41],[22850.3,63],[22850.3,14],[22883.7,77],[22894.2,18],[22894.2,117],[22894.3,673],[22894.3,8],[22928.5,77],[22962,41],[22962,77],[22996.5,77],[23030.5,77],[23064.6,41],[23064.7,29],[23064.7,48],[23098.2,111],[23133,77],[23166.4,41],[23166.5,77],[23193.2,18],[23193.2,65],[23193.3,561],[23193.3,8],[23295.2,41],[23397.5,41],[23499.7,41],[23601.5,41],[23703.1,41],[23805.7,41],[23908.4,41],[24010.6,41],[24048,41],[24048.1,245],[24057.7,77],[24083.3,77],[24083.7,39],[24092.3,73],[24092.4,108],[24092.4,14]]} diff --git a/src/main/runtime/__fixtures__/codex-0-155-1-timed-turn.txt b/src/main/runtime/__fixtures__/codex-0-155-1-timed-turn.txt new file mode 100644 index 00000000000..6064224f724 --- /dev/null +++ b/src/main/runtime/__fixtures__/codex-0-155-1-timed-turn.txt @@ -0,0 +1,26 @@ +[?2004h[>4;0m[>7u[?1004h]10;?\]11;?\[?u[?2026h╭───────────────────────────────────────╮│ >_ OpenAI Codex (v0.155.1) ││ ││ model: loading /model to change ││ directory: loading │╰───────────────────────────────────────╯  › Ask Codex to do anything  ? for shortcuts[0 q╭[?25h[?2026l[?2026h[0 q╭[?25h[?2026l[?2026h[0 q╭[?25h[?2026l[?2026h[0 q╭[?25h[?2026l[?2026h[0 q╭[?25h[?2026l[?2026h[0 q╭[?25h[?2026l[?2026h╭──────────────────────────────────────────────────╮│ >_ OpenAI Codex (v0.155.1) ││ ││ model: loading /model to change ││ directory: ~/orca-lanes/sta8834/corpus/scratch ││ permissions: YOLO mode │╰──────────────────────────────────────────────────╯  › Ask Codex to do anything  ? for shortcuts[0 q╭[?25h[?2026l[?2026h[0 q╭[?25h[?2026l[?2026h[0 q╭[?25h[?2026l[?2026h[0 q╭[?25h[?2026l[?2026h[0 q╭[?25h[?2026l[?2026h[0 q╭[?25h[?2026l[?2026h[0 q╭[?25h[?2026l[?2026h[0 q╭[?25h[?2026l[?2026h[0 q╭[?25h[?2026l[?2026h[0 q╭[?25h[?2026l[?2026h[0 q╭[?25h[?2026l]0;scratch[?2026hgpt-6-sol default · ~/orca-lanes/sta8834/corpus/scratch[0 q╭[?25h[?2026l[?2026h[0 q╭[?25h[?2026l[?2026h[0 q╭[?25h[?2026l]0;⠋ scratch]0;⠙ scratch[?2026hMMMMMMMMM +╭──────────────────────────────────────────────────╮ +│ >_ OpenAI Codex (v0.155.1) │ +│ │ +│ model: gpt-6-sol medium /model to change │ +│ directory: ~/orca-lanes/sta8834/corpus/scratch │ +│ permissions: YOLO mode │ +╰──────────────────────────────────────────────────╯ + + Tip: New Use /fast to enable our fastest inference with increased plan usage.  › Ask Codex to do anything  gpt-6-sol medium · ~/orca-lanes/sta8834/corpus/scratch[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;scratch[?2026h[0 q [?25h[?2026l[?2026hMM + +• You have 3 usage limit resets available. Run /usage to use one.[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026hList the files here and summarizein2bullets.[0 q [?25h[?2026l[?2026hMMMM + + +› List the files here and summarize in 2 bullets. +Ask Codex to do anything[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠇ scratch[?2026h • Working (0s • esc to interrupt)  › Ask Codex to do anything  gpt-6-sol medium · ~/orca-lanes/sta8834/corpus/scratch[0 q [?25h[?2026l]0;⠏ scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠋ scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠙ scratch[?2026h[0 q [?25h[?2026l]0;⠙ renaming... ⠙ | scratch[?2026h · renaming... ⠙[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠹ renaming... ⠹ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠸ renaming... ⠸ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠼ renaming... ⠼ | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠴ renaming... ⠴ | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠦ renaming... ⠦ | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠧ renaming... ⠧ | scratch[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠇ renaming... ⠇ | scratch[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠏ renaming... ⠏ | scratch[?2026h1[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠋ renaming... ⠋ | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠙ renaming... ⠙ | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠹ renaming... ⠹ | scratch[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠸ renaming... ⠸ | scratch[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠼ renaming... ⠼ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠴ renaming... ⠴ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠦ renaming... ⠦ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠧ renaming... ⠧ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠇ renaming... ⠇ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h2[0 q [?25h[?2026l]0;⠏ renaming... ⠏ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠋ renaming... ⠋ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠙ renaming... ⠙ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠹ renaming... ⠹ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠸ renaming... ⠸ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠼ renaming... ⠼ | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠴ renaming... ⠴ | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠦ renaming... ⠦ | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠧ renaming... ⠧ | scratch[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠇ renaming... ⠇ | scratch[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠏ renaming... ⠏ | scratch[?2026h3[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠋ renaming... ⠋ | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠙ renaming... ⠙ | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠹ renaming... ⠹ | scratch[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠸ renaming... ⠸ | scratch[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠼ renaming... ⠼ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠴ renaming... ⠴ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠦ renaming... ⠦ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠧ renaming... ⠧ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠇ renaming... ⠇ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h4[0 q [?25h[?2026l]0;⠏ renaming... ⠏ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠋ renaming... ⠋ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠙ renaming... ⠙ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠹ renaming... ⠹ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠸ renaming... ⠸ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠼ renaming... ⠼ | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠴ renaming... ⠴ | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠦ renaming... ⠦ | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠧ renaming... ⠧ | scratch[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠇ renaming... ⠇ | scratch[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h5[0 q [?25h[?2026l]0;⠏ renaming... ⠏ | scratch[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠋ renaming... ⠋ | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠙ renaming... ⠙ | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠹ renaming... ⠹ | scratch[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠸ renaming... ⠸ | scratch[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠼ renaming... ⠼ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠴ renaming... ⠴ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠦ renaming... ⠦ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠧ renaming... ⠧ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠇ renaming... ⠇ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h6[0 q [?25h[?2026l]0;⠏ renaming... ⠏ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠋ renaming... ⠋ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠙ renaming... ⠙ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠹ renaming... ⠹ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠸ renaming... ⠸ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠼ renaming... ⠼ | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠴ renaming... ⠴ | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠦ renaming... ⠦ | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠧ renaming... ⠧ | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠇ renaming... ⠇ | scratch[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h7[0 q [?25h[?2026l]0;⠏ renaming... ⠏ | scratch[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠋ renaming... ⠋ | scratch[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠙ renaming... ⠙ | scratch[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠹ renaming... ⠹ | scratch[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠸ renaming... ⠸ | scratch[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠼ renaming... ⠼ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠴ renaming... ⠴ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠦ renaming... ⠦ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠧ renaming... ⠧ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠇ renaming... ⠇ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠏ renaming... ⠏ | scratch[?2026h8[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠋ renaming... ⠋ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠙ renaming... ⠙ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠹ renaming... ⠹ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠸ renaming... ⠸ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠼ renaming... ⠼ | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠴ renaming... ⠴ | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠦ renaming... ⠦ | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠧ renaming... ⠧ | scratch[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠇ renaming... ⠇ | scratch[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h9[0 q [?25h[?2026l]0;⠏ renaming... ⠏ | scratch[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠋ renaming... ⠋ | scratch[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠙ renaming... ⠙ | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠹ renaming... ⠹ | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠸ renaming... ⠸ | scratch[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠼ renaming... ⠼ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠴ renaming... ⠴ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠦ renaming... ⠦ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠧ renaming... ⠧ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠇ renaming... ⠇ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h10s • esc to interupt)[0 q [?25h[?2026l]0;⠏ renaming... ⠏ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠋ renaming... ⠋ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠙ renaming... ⠙ | scratch[?2026h[0 q [?25h[?2026l[?2026hMM + +• I’ll inspect the current directory and summarize what’s there in two bullets.[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠹ renaming... ⠹ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠸ renaming... ⠸ | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠼ renaming... ⠼ | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠴ renaming... ⠴ | scratch[?2026h[0 q [?25h[?2026l]0;⠴ scratch]0;⠴ List and summarize files | scratch[?2026h•List ad summarize files[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠦ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠧ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠇ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h1[0 q [?25h[?2026l]0;⠏ List and summarize files | scratch[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠋ List and summarize files | scratch[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠙ List and summarize files | scratch[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠹ List and summarize files | scratch[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠸ List and summarize files | scratch[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠼ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠴ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠦ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠧ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠇ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h2[0 q [?25h[?2026l]0;⠏ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠋ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠙ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠹ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠸ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠼ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠴ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠦ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠧ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠇ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h3[0 q [?25h[?2026l]0;⠏ List and summarize files | scratch[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠋ List and summarize files | scratch[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠙ List and summarize files | scratch[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠹ List and summarize files | scratch[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠸ List and summarize files | scratch[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠼ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠴ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠦ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠧ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠇ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h4[0 q [?25h[?2026l]0;⠏ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠋ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠙ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h • Explored └ List rg --files -g '*' -g '!*/.git/*' • Working (14s • esc to interrupt)  › Ask Codex to do anything  gpt-6-sol medium · ~/orca-lanes/sta8834/corpus/scratch · List and summarize files[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠹ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠸ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠼ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠴ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠦ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠧ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠇ List and summarize files | scratch[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h5[0 q [?25h[?2026l]0;⠏ List and summarize files | scratch[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠋ List and summarize files | scratch[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠙ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠹ List and summarize files | scratch[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠸ List and summarize files | scratch[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠼ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠴ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠦ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠧ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠇ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h6[0 q [?25h[?2026l]0;⠏ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠋ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠙ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠹ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠸ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠼ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠴ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠦ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠧ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠇ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h7[0 q [?25h[?2026l]0;⠏ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠋ List and summarize files | scratch[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠙ List and summarize files | scratch[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠹ List and summarize files | scratch[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠸ List and summarize files | scratch[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠼ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠴ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠦ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠧ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠇ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h8[0 q [?25h[?2026l]0;⠏ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠋ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠙ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠹ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026hMMM + +• Explored + └ List rg --files -g '*' -g '!*/.git/*' • Working (18s • esc to interrupt)  › Ask Codex to do anything  gpt-6-sol medium · ~/orca-lanes/sta8834/corpus/scratch · List and summarize files[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠸ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠼ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026h•[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;⠴ List and summarize files | scratch[?2026h[0 q [?25h[?2026l[?2026hMM + +• - README.md and notes.txt are the two working files.  › Ask Codex to do anything  gpt-6-sol medium · ~/orca-lanes/sta8834/corpus/scratch · List and summarize files[0 q [?25h[?2026l]0;⠦ List and summarize files | scratch]0;⠧ List and summarize files | scratch]0;⠇ List and summarize files | scratch]0;⠏ List and summarize files | scratch]0;⠋ List and summarize files | scratch]0;⠙ List and summarize files | scratch]0;⠹ List and summarize files | scratch]0;⠸ List and summarize files | scratch]0;⠼ List and summarize files | scratch[?2026hM + - A .git/ directory is present, containing repository metadata and history.[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l[?2026h[0 q [?25h[?2026l]0;List and summarize files | scratch[?2026hMM + + done 9:43 PM[0 q [?25h[?2026l \ No newline at end of file diff --git a/src/main/runtime/__fixtures__/codex-0-157-1-update-dialog.meta.json b/src/main/runtime/__fixtures__/codex-0-157-1-update-dialog.meta.json new file mode 100644 index 00000000000..f43deccb966 --- /dev/null +++ b/src/main/runtime/__fixtures__/codex-0-157-1-update-dialog.meta.json @@ -0,0 +1,9 @@ +{ + "capturedAt": "2026-09-29T01:41:43.328Z", + "platform": "darwin", + "command": ["codex", "--no-daemon", "--dangerously-bypass-approvals-and-sandbox"], + "cols": 120, + "rows": 40, + "note": "codex-cli 0.157.1: launch with the update check on; the update dialog owns the screen. STA-8834.", + "exitCode": 0 +} diff --git a/src/main/runtime/__fixtures__/codex-0-157-1-update-dialog.txt b/src/main/runtime/__fixtures__/codex-0-157-1-update-dialog.txt new file mode 100644 index 00000000000..4bd32773735 --- /dev/null +++ b/src/main/runtime/__fixtures__/codex-0-157-1-update-dialog.txt @@ -0,0 +1 @@ +[?2004h[>4;0m[>7u[?1004h]10;?\]11;?\[?u[?2026h[?25l[?1049h[>4;0m[>7u[?1007l[?1000h[?1002h[?1006h[?1003h[?25l[?2026h[?25l╭───────────────────────────────────────╮│ >_ OpenAI Codex (v0.157.1) ││ ││ model: loading /model to change ││ directory: loading │╰───────────────────────────────────────╯›Ask Codex to do anything?forshortcuts[0 q╭[?25h[?2026l[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l───────────╮ │ │ loading /model to change │ ~/orca-lanes/sta8834/corpus/scratch ││ permissions: YOLO mode │╰──────────────────────────────────────────────────╯[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l  Updat available · 0.157.1→0.158.0 Releasenotes:]8;;https://github.com/openai/codex/releases/latesthttps://github.com/openai/codex/releases/latest]8;; › 1. Update now (runs `npm install -g @openai/codex`)  2. Skip 3. Skip until next versionenter continue · esc skip [?2026l \ No newline at end of file diff --git a/src/main/runtime/__fixtures__/codex-0-158-0-approval.meta.json b/src/main/runtime/__fixtures__/codex-0-158-0-approval.meta.json new file mode 100644 index 00000000000..a333bd29473 --- /dev/null +++ b/src/main/runtime/__fixtures__/codex-0-158-0-approval.meta.json @@ -0,0 +1,18 @@ +{ + "capturedAt": "2026-09-29T01:43:13.919Z", + "platform": "darwin", + "command": [ + "codex", + "--no-daemon", + "-c", + "check_for_update_on_startup=false", + "-a", + "on-request", + "-s", + "read-only" + ], + "cols": 120, + "rows": 40, + "note": "codex-cli 0.158.0: read-only sandbox with on-request approvals; a command approval dialog owns the screen at the end. STA-8834.", + "exitCode": 0 +} diff --git a/src/main/runtime/__fixtures__/codex-0-158-0-approval.txt b/src/main/runtime/__fixtures__/codex-0-158-0-approval.txt new file mode 100644 index 00000000000..925a5165fc5 --- /dev/null +++ b/src/main/runtime/__fixtures__/codex-0-158-0-approval.txt @@ -0,0 +1 @@ +[?2004h[>4;0m[>7u[?1004h]10;?\]11;?\[?u[?2026h[?25l[?1049h[>4;0m[>7u[?1007l[?1000h[?1002h[?1006h[?1003h[?25l[?2026h[?25l>_ OpenAI Codex (v0.158.0)loadingAll right. What have you got?⣀⣤⣤⣤⣀⣀⣠⣶⣿⣿⣿⣿⣿⣿⣿⣿⣦⣤⣤⣤⣤⣤⣤⡀⢀⣾⣿⣿⠿⠋⠉⠉⢉⣭⣿⣿⣿⣿⣿⠿⣿⣿⣿⣿⣷⣄⣀⣾⣿⣿⠃⣀⣴⣾⣿⣿⡿⠟⠋⣀⡀⠈⠙⢿⣿⣿⣧⣀⣶⣿⣿⣿⣿⡇⢸⣿⣿⡿⠛⠉⢀⣠⣴⣿⣿⣿⣷⣦⣀⠈⢻⣿⣿⡇⣰⣿⣿⡿⢿⣿⣿⡇⢸⣿⣿⢀⣤⣶⣿⣿⣿⠟⠛⠻⣿⣿⣿⣿⣮⣿⣿⡷⢰⣿⣿⡟⠁⢸⣿⣿⡇⢸⣿⣿⣿⣿⠿⠿⣿⣿⣿⣦⣄⡀⠈⠛⠿⣿⣿⣿⣧⡀⣾⣿⣿⠃⢸⣿⣿⡇⢸⣿⣿⠋⠁⠈⠙⢻⣿⣿⣿⣶⣤⡀⠹⢿⣿⣷⡄⢸⣿⣿⣇⠸⣿⣿⣷⣦⣼⣿⣿⢸⣿⣿⠻⢿⣿⣿⡇⠘⣿⣿⣿⠈⢿⣿⣿⣦⡀⠈⠛⠿⣿⣿⣿⣿⣄⡀⢀⣠⣼⣿⣿⣿⣿⡇⣿⣿⣿⠇⢻⣿⣿⣿⣷⣦⣀⠈⠙⠻⣿⣿⣿⣶⣶⣿⣿⣿⣿⣿⣿⣿⡇⣠⣿⣿⣿⢸⣿⣿⡿⢿⣿⣿⣿⣦⣠⣴⣿⣿⣿⡿⠟⠋⢸⣿⣿⣿⣿⣷⣴⣿⣿⣿⠃⠘⣿⣿⣷⠈⠛⢿⣿⣿⣿⠿⠋⠉⣠⣴⣿⣿⣿⣿⣿⣿⣿⣿⠟⠁⠻⣿⣿⣿⣤⣀⠈⠉⢀⣤⣶⣿⣿⣿⠿⠟⠁⣰⣿⣿⡟⠋⠁⠈⠿⣿⣿⣿⣿⣶⣾⣿⣿⣿⣿⠟⠋⠁⣠⣼⣿⣿⡟⠙⠛⠛⠛⠻⠛⢿⣿⣿⣿⣿⣷⣾⣿⣿⣿⡿⠏⠈⠙⠛⠿⠿⠿⠿⠛⠉›Ask Codex to do anything?forshortcuts[0 q [?25h[?2026l[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l~/orca-lanes/sta8834/corpus/scratch[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;scratch[?2026h[?25lGPT-6-Sol default·~/orca-lanes/sta8834/corpus/scratch[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠋ scratch]0;⠙ scratch[?2026h[?25lmdim · ~/orca-lanes/sta834/corpus/scratch[?25h[?2026l[?2026h[?25h[?2026l]0;scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25lRun `touch approved.txt`.[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l› Run`touchapproved.txt`.Ask Codex to do anything?forshortcuts[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠇ scratch[?2026h[?25l•Working(0s • esc to interrupt)[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠏ scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠋ scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠙ scratch[?2026h[?25h[?2026l]0;⠙ ⠙ | scratch[?2026h[?25l·⠙[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠹ ⠹ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠸ ⠸ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠼ ⠼ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠴ ⠴ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠦ ⠦ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠧ ⠧ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠇ ⠇ | scratch[?2026h[?25l•[?25h[?2026l[?2026h[?25l1[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠏ ⠏ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠋ ⠋ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠙ ⠙ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠹ ⠹ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠸ ⠸ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠼ ⠼ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠴ ⠴ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠦ ⠦ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠧ ⠧ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠇ ⠇ | scratch[?2026h[?25h[?2026l[?2026h[?25l2[?25h[?2026l[?2026h[?25h[?2026l]0;⠏ ⠏ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠋ ⠋ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠙ ⠙ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠹ ⠹ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠸ ⠸ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠼ ⠼ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠴ ⠴ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠦ ⠦ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠧ ⠧ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠇ ⠇ | scratch[?2026h[?25l3[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠏ ⠏ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠋ ⠋ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠙ ⠙ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠹ ⠹ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠸ ⠸ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠼ ⠼ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠴ ⠴ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠦ ⠦ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠧ ⠧ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠇ ⠇ | scratch[?2026h[?25h[?2026l[?2026h[?25l4[?25h[?2026l[?2026h[?25h[?2026l]0;⠏ ⠏ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠋ ⠋ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠙ ⠙ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠹ ⠹ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠸ ⠸ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠼ ⠼ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠴ ⠴ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠦ ⠦ | scratch[?2026h[?25l•[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠧ ⠧ | scratch[?2026h[?25l•[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠇ ⠇ | scratch[?2026h[?25h[?2026l[?2026h[?25l5[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠏ ⠏ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠋ ⠋ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠙ ⠙ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠹ ⠹ | scratch[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l[?2026h[?25h[?2026l]0;⠸ ⠸ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠼ ⠼ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠴ ⠴ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠦ ⠦ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠧ ⠧ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠇ ⠇ | scratch[?2026h[?25l6[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠏ ⠏ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠋ ⠋ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠙ ⠙ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠹ ⠹ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠸ ⠸ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠼ ⠼ | scratch[?2026h[?25l•[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠴ ⠴ | scratch[?2026h[?25l•[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠦ ⠦ | scratch[?2026h[?25l•[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠧ ⠧ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠇ ⠇ | scratch[?2026h[?25h[?2026l[?2026h[?25l7[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠏ ⠏ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠋ ⠋ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠙ ⠙ | scratch[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l[?2026h[?25h[?2026l]0;⠹ ⠹ | scratch[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l[?2026h[?25h[?2026l]0;⠸ ⠸ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠼ ⠼ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠴ ⠴ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠦ ⠦ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠧ ⠧ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠇ ⠇ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l8[?25h[?2026l[?2026h[?25h[?2026l]0;⠏ ⠏ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠋ ⠋ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠙ ⠙ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠹ ⠹ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠸ ⠸ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠼ ⠼ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠴ ⠴ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠦ ⠦ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠧ ⠧ | scratch[?2026h[?25l•[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠇ ⠇ | scratch[?2026h[?25l•[?25h[?2026l[?2026h[?25l9[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠏ ⠏ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠋ ⠋ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠙ ⠙ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠹ ⠹ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠸ ⠸ | scratch[?2026h[?25l• I [?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l’ll[?25h[?2026l]0;⠼ ⠼ | scratch[?2026h[?25lcreate[?25h[?2026l]0;⠴ ⠴ | scratch[?2026h[?25l⠴[?25h[?2026l[?2026h[?25lthe[?25h[?2026l]0;⠦ ⠦ | scratch[?2026h[?25l⠦[?25h[?2026l[?2026h[?25lfile[?25h[?2026l[?2026h[?25linthecurrent[?25h[?2026l]0;⠧ ⠧ | scratch[?2026h[?25l⠧[?25h[?2026l[?2026h[?25lworkspace;[?25h[?2026l]0;⠇ ⠇ | scratch[?2026h[?25l⠇[?25h[?2026l[?2026h[?25lthis[?25h[?2026l]0;⠏ ⠏ | scratch[?2026h[?25lrequires[?25h[?2026l]0;⠋ ⠋ | scratch[?2026h[?25l⠋[?25h[?2026l[?2026h[?25lwrite[?25h[?2026l[?2026h[?25laccess[?25h[?2026l]0;⠙ ⠙ | scratch[?2026h[?25l⠙[?25h[?2026l[?2026h[?25lbeyond[?25h[?2026l[?2026h[?25lthe[?25h[?2026l]0;⠹ ⠹ | scratch[?2026h[?25l⠹[?25h[?2026l[?2026h[?25lread-only[?25h[?2026l]0;⠸ ⠸ | scratch[?2026h[?25lsandbox.[?25h[?2026l]0;⠼ ⠼ | scratch[?2026h[?25l⠼[?25h[?2026l]0;⠴ ⠴ | scratch[?2026h[?25l⠴[?25h[?2026l]0;⠦ ⠦ | scratch[?2026h[?25l⠦[?25h[?2026l]0;⠧ ⠧ | scratch[?2026h[?25l⠧[?25h[?2026l]0;⠇ ⠇ | scratch[?2026h[?25l⠇[?25h[?2026l]0;⠏ ⠏ | scratch[?2026h[?25l⠏[?25h[?2026l[?2026h[?25l•Working(11s • esc to interrupt)[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠋ ⠋ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠙ ⠙ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠹ ⠹ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠸ ⠸ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠼ ⠼ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠴ ⠴ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠦ ⠦ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠧ ⠧ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠇ ⠇ | scratch[?2026h[?25l2[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠏ ⠏ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠋ ⠋ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠙ ⠙ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠹ ⠹ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠸ ⠸ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠼ ⠼ | scratch[?2026h[?25l•[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠴ ⠴ | scratch[?2026h[?25l•[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠦ ⠦ | scratch[?2026h[?25l•[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠧ ⠧ | scratch[?2026h[?25l•[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠇ ⠇ | scratch[?2026h[?25h[?2026l[?2026h[?25l3[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠏ ⠏ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠋ ⠋ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠙ ⠙ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠹ ⠹ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;[ . ] Action Required | ⠸ | scratch[?2026h[?25l•Runningtouch approved.txtWould you like to run the following command?Environment:localReason:May I create approved.txt in the current workspace as requested?$touch approved.txt › 1. Yes, proceed (y)  2. Yes, and don't ask againforcommandsthatstartwith`touchapproved.txt`(p)3.No,andtellCodexwhattododifferently(esc)Press enter to confirm or esc to cancel [?2026l]0;[ . ] Action Required | ⠼ | scratch[?2026h[?2026l]0;[ . ] Action Required | ⠴ | scratch[?2026h[?2026l]0;[ . ] Action Required | ⠦ | scratch[?2026h[?2026l]0;[ . ] Action Required | ⠧ | scratch[?2026h[?2026l]0;[ . ] Action Required | ⠇ | scratch[?2026h[?2026l]0;[ . ] Action Required | ⠏ | scratch[?2026h[?2026l]0;[ ! ] Action Required | ⠋ | scratch[?2026h[?2026l]0;[ ! ] Action Required | ⠙ | scratch[?2026h[?2026l]0;[ ! ] Action Required | ⠹ | scratch[?2026h[?2026l]0;[ ! ] Action Required | ⠸ | scratch[?2026h[?2026l]0;[ ! ] Action Required | ⠼ | scratch[?2026h[?2026l]0;[ ! ] Action Required | ⠴ | scratch[?2026h[?2026l]0;[ ! ] Action Required | ⠦ | scratch[?2026h[?2026l]0;[ ! ] Action Required | ⠧ | scratch[?2026h[?2026l]0;[ ! ] Action Required | ⠇ | scratch[?2026h[?2026l]0;[ ! ] Action Required | ⠏ | scratch[?2026h[?2026l]0;[ . ] Action Required | ⠋ | scratch[?2026h[?2026l]0;[ . ] Action Required | ⠙ | scratch[?2026h[?2026l]0;[ . ] Action Required | ⠹ | scratch[?2026h[?2026l]0;[ . ] Action Required | ⠸ | scratch[?2026h[?2026l]0;[ . ] Action Required | ⠼ | scratch[?2026h[?2026l]0;[ . ] Action Required | ⠴ | scratch[?2026h[?2026l]0;[ . ] Action Required | ⠦ | scratch[?2026h[?2026l]0;[ . ] Action Required | ⠧ | scratch[?2026h[?2026l]0;[ . ] Action Required | ⠇ | scratch[?2026h[?2026l]0;[ . ] Action Required | ⠏ | scratch[?2026h[?2026l]0;[ ! ] Action Required | ⠋ | scratch[?2026h[?2026l]0;[ ! ] Action Required | ⠙ | scratch[?2026h[?2026l]0;[ ! ] Action Required | ⠹ | scratch]0;[ ! ] Action Required | ⠸ | scratch[?2026h[?2026l]0;[ ! ] Action Required | ⠼ | scratch[?2026h[?2026l]0;[ ! ] Action Required | ⠴ | scratch[?2026h[?2026l]0;[ ! ] Action Required | ⠦ | scratch[?2026h[?2026l]0;[ ! ] Action Required | ⠧ | scratch[?2026h[?2026l]0;[ ! ] Action Required | ⠇ | scratch[?2026h[?2026l]0;[ ! ] Action Required | ⠏ | scratch[?2026h[?2026l]0;[ . ] Action Required | ⠋ | scratch[?2026h[?2026l]0;[ . ] Action Required | ⠙ | scratch[?2026h[?2026l]0;[ . ] Action Required | ⠹ | scratch[?2026h[?2026l]0;[ . ] Action Required | ⠸ | scratch[?2026h[?2026l]0;[ . ] Action Required | ⠼ | scratch[?2026h[?2026l]0;[ . ] Action Required | ⠴ | scratch[?2026h[?2026l]0;[ . ] Action Required | ⠦ | scratch[?2026h[?2026l]0;[ . ] Action Required | ⠧ | scratch[?2026h[?2026l]0;[ . ] Action Required | ⠇ | scratch[?2026h[?2026l]0;[ . ] Action Required | scratch]0;[ . ] Action Required | Create approved.txt | scratch[?2026h[?2026l]0;[ ! ] Action Required | Create approved.txt | scratch]0;[ . ] Action Required | Create approved.txt | scratch]0;[ ! ] Action Required | Create approved.txt | scratch]0;[ . ] Action Required | Create approved.txt | scratch]0;[ ! ] Action Required | Create approved.txt | scratch]0;[ . ] Action Required | Create approved.txt | scratch]0;[ ! ] Action Required | Create approved.txt | scratch]0;[ . ] Action Required | Create approved.txt | scratch]0;[ ! ] Action Required | Create approved.txt | scratch]0;[ . ] Action Required | Create approved.txt | scratch]0;[ ! ] Action Required | Create approved.txt | scratch]0;[ . ] Action Required | Create approved.txt | scratch]0;[ ! ] Action Required | Create approved.txt | scratch \ No newline at end of file diff --git a/src/main/runtime/__fixtures__/codex-0-158-0-timed-turn.meta.json b/src/main/runtime/__fixtures__/codex-0-158-0-timed-turn.meta.json new file mode 100644 index 00000000000..2c3defda30a --- /dev/null +++ b/src/main/runtime/__fixtures__/codex-0-158-0-timed-turn.meta.json @@ -0,0 +1,15 @@ +{ + "capturedAt": "2026-09-29T01:46:36.717Z", + "platform": "darwin", + "command": [ + "codex", + "--no-daemon", + "-c", + "check_for_update_on_startup=false", + "--dangerously-bypass-approvals-and-sandbox" + ], + "cols": 120, + "rows": 40, + "note": "codex-cli 0.158.0, default tui animations. One tool-using turn sent once the composer had been quiet 2.5s; cut 20s past the last busy frame, before exit. .timing.json holds each PTY chunk as [ms since spawn, UTF-16 length] and the prompt-submit time. STA-8834.", + "exitCode": 0 +} diff --git a/src/main/runtime/__fixtures__/codex-0-158-0-timed-turn.timing.json b/src/main/runtime/__fixtures__/codex-0-158-0-timed-turn.timing.json new file mode 100644 index 00000000000..02745d043e1 --- /dev/null +++ b/src/main/runtime/__fixtures__/codex-0-158-0-timed-turn.timing.json @@ -0,0 +1 @@ +{"promptSentAtMs":7226.9,"chunks":[[70.2,28],[70.4,27],[321.3,80],[321.5,9],[324.7,14],[324.8,578],[325.8,494],[327,43],[329.1,43],[331.5,43],[333.5,43],[335.5,43],[340.4,216],[340.5,8],[342.3,43],[344,43],[346,43],[372.5,43],[374.1,43],[385.8,43],[1330.3,43],[1332.2,35],[1332.2,8],[1334.4,43],[1336.3,43],[1338.5,43],[1340.5,43],[2820.3,43],[2829.5,43],[2831.2,12],[2833.5,43],[2835.6,169],[2835.7,8],[2842.6,43],[2866,43],[2922.5,14],[2944.6,14],[2946.2,14],[2946.2,180],[2947.8,43],[2949.3,43],[3006.8,12],[3009.4,43],[3941,43],[4089.1,43],[6627.2,43],[6627.3,377],[6627.3,14],[6627.4,35],[6627.4,8],[6627.6,43],[6627.7,43],[6627.8,43],[6627.9,43],[6628,43],[6628.2,43],[6628.3,43],[6628.4,35],[6628.4,8],[6628.5,35],[6628.5,8],[6628.6,43],[6628.7,43],[6628.9,43],[6629,43],[6629.1,43],[6629.2,43],[6629.3,43],[6629.4,35],[6629.4,8],[6629.5,43],[6629.7,43],[6629.8,43],[6629.9,35],[6629.9,8],[6630,35],[6630,8],[6630.1,43],[6630.2,35],[6630.3,8],[6630.4,43],[6630.5,35],[6630.5,8],[6630.6,35],[6630.6,8],[6630.7,43],[6630.8,35],[6630.9,8],[6630.9,43],[6631.1,43],[6631.2,35],[6631.2,8],[6631.3,35],[6631.3,8],[6631.4,35],[6631.4,8],[6631.5,35],[6631.5,8],[6631.6,35],[6631.6,8],[6631.7,35],[6631.7,8],[6631.9,35],[6631.9,8],[6632,35],[6632,8],[6632.1,43],[6632.2,35],[6632.2,8],[6632.3,43],[6632.4,43],[6632.5,43],[6659.2,117],[6659.3,8],[7227.9,44],[7228.6,138],[7228.7,14],[7229,161],[7229.2,8],[7239.4,43],[7247.7,43],[7271.8,14],[7273,163],[7273.1,8],[7306.6,43],[7339.4,14],[7339.5,35],[7339.6,8],[7374.3,43],[7407.9,43],[7441.3,14],[7441.5,43],[7474.6,43],[7490.5,43],[7513.7,43],[7535.2,14],[7535.3,35],[7535.3,8],[7536.4,18],[7545.7,89],[7578.7,43],[7611.6,43],[7646,18],[7646.1,43],[7679.3,43],[7713.6,43],[7747,18],[7747.2,35],[7747.2,8],[7780,43],[7813.5,43],[7846.7,18],[7846.8,75],[7846.9,8],[7879.7,43],[7912.9,43],[7946.5,18],[7946.7,83],[7980.7,43],[8015.1,43],[8048.9,18],[8049.1,83],[8083.6,43],[8116.9,43],[8150.3,18],[8150.5,69],[8150.6,14],[8185.3,43],[8219.4,35],[8219.5,8],[8253.4,18],[8253.5,75],[8253.5,8],[8287.5,62],[8321.7,83],[8354.9,18],[8355,43],[8388.5,43],[8422.7,83],[8456.2,18],[8456.4,35],[8456.4,8],[8489.6,43],[8522.9,83],[8534.4,18],[8534.6,43],[8568.8,43],[8603.1,43],[8637.1,18],[8637.4,69],[8637.4,14],[8672.2,43],[8706.4,83],[8738.4,18],[8738.6,43],[8772.8,43],[8806.7,43],[8840,18],[8840.2,35],[8840.3,8],[8874.6,43],[8908,43],[8941.4,18],[8941.7,35],[8941.7,8],[8976.8,43],[9010.8,43],[9044.4,18],[9044.7,43],[9077.8,43],[9112.4,43],[9146.4,18],[9146.5,35],[9146.5,8],[9179.7,43],[9213.5,43],[9247,18],[9247.2,35],[9247.2,8],[9281.4,54],[9281.4,8],[9315.9,43],[9349.2,18],[9349.4,35],[9349.4,8],[9383.7,43],[9418,43],[9446.6,18],[9446.8,90],[9447,8],[9456.9,43],[9493.4,63],[9502.6,60],[9519.3,82],[9534.9,18],[9535.1,52],[9535.2,8],[9555.5,58],[9555.7,8],[9575.4,61],[9597.6,59],[9619.5,64],[9629.8,51],[9629.9,8],[9643,18],[9643.2,52],[9643.3,8],[9668.1,56],[9668.4,8],[9684.5,58],[9786.6,18],[9788.1,72],[9788.2,8],[9889.3,18],[9890.6,80],[9918.4,171],[9953.3,101],[9985.2,43],[10018.5,43],[10051.6,18],[10051.8,75],[10051.8,8],[10085.6,43],[10119.4,43],[10152.9,18],[10153.1,75],[10153.1,8],[10186.5,43],[10220.8,43],[10254.6,18],[10254.8,69],[10254.9,14],[10289.8,54],[10290,8],[10324.3,83],[10357.6,18],[10357.9,43],[10391.4,43],[10424,83],[10457.5,18],[10457.7,35],[10457.7,8],[10491,43],[10524.9,83],[10558.6,18],[10559,35],[10559.1,8],[10592.5,43],[10626.9,83],[10660.9,18],[10661.1,43],[10694.8,43],[10729.4,83],[10763.4,18],[10763.5,43],[10798.4,43],[10833.1,18],[10833.2,43],[10866.5,43],[10900.5,43],[10933.6,18],[10933.7,43],[10966.9,43],[11000.6,43],[11034.6,18],[11034.9,43],[11069.1,43],[11103,43],[11137.1,18],[11137.2,35],[11137.3,8],[11169.2,43],[11199,43],[11231.3,18],[11231.4,43],[11260.7,338],[11260.8,8],[11270.5,43],[11286.1,62],[11296.4,72],[11296.5,8],[11330.4,43],[11364.5,18],[11364.7,43],[11398.1,43],[11432.1,18],[11432.3,35],[11432.3,8],[11465.9,43],[11498.9,43],[11532.8,18],[11533,35],[11533,8],[11566.1,43],[11598.9,43],[11633,18],[11633.2,35],[11633.2,8],[11667.1,43],[11700.9,43],[11735,18],[11735.2,43],[11769.5,43],[11802.8,43],[11835.7,18],[11835.9,35],[11835.9,8],[11869.6,83],[11903.7,43],[11937.8,18],[11938.1,35],[11938.1,8],[11961.5,119],[11962.2,14],[11965.3,41],[11970.6,103],[12004.5,43],[12038.7,41],[12038.9,75],[12039,8],[12073.3,43],[12107.2,43],[12141,41],[12141.3,14],[12141.4,69],[12174.7,43],[12208.4,43],[12241.5,41],[12241.8,14],[12241.8,69],[12276.1,62],[12309.7,43],[12343.6,41],[12343.7,69],[12343.8,14],[12378,43],[12412.2,43],[12445.3,41],[12445.4,75],[12445.4,8],[12479.1,43],[12512.6,75],[12512.7,8],[12545.6,41],[12545.8,35],[12545.9,8],[12579.3,43],[12612.8,83],[12646.7,41],[12647,35],[12647,8],[12664.5,43],[12698.5,43],[12731.6,41],[12732,14],[12732,69],[12766.1,43],[12799.5,43],[12833.8,41],[12834.3,35],[12834.3,8],[12867.9,43],[12902.4,43],[12935.2,41],[12935.7,35],[12935.8,8],[12969.7,43],[13003.8,43],[13037.5,41],[13037.7,43],[13071.9,43],[13104.8,43],[13137.8,41],[13138,43],[13171.4,43],[13205.7,43],[13240.2,41],[13240.3,43],[13274.4,62],[13307.9,43],[13341.3,41],[13341.5,35],[13341.5,8],[13376.5,43],[13409.8,43],[13443.1,41],[13443.3,43],[13476.8,43],[13510.5,43],[13544.3,41],[13544.5,35],[13544.5,8],[13578.7,43],[13612.2,43],[13645.2,41],[13645.4,35],[13645.4,8],[13679.6,43],[13714.4,43],[13747.5,41],[13747.8,35],[13747.9,8],[13781.8,43],[13814.6,43],[13848,41],[13848.3,69],[13848.3,14],[13881.6,43],[13916.7,43],[13950.2,41],[13950.4,69],[13950.4,14],[13984.6,43],[14018.3,43],[14052.6,41],[14052.7,69],[14052.7,14],[14086.4,43],[14120.6,43],[14154.9,41],[14155,69],[14155,14],[14181.8,43],[14211.3,43],[14244.5,41],[14244.7,75],[14244.7,8],[14277.6,54],[14277.7,8],[14287.3,273],[14287.3,8],[14305.4,43],[14315.6,43],[14349.5,41],[14349.6,75],[14349.7,8],[14383.6,43],[14417.1,75],[14417.2,8],[14451.1,41],[14451.3,35],[14451.3,8],[14485.5,43],[14520.1,75],[14520.2,8],[14554.3,41],[14554.5,35],[14554.6,8],[14589.7,43],[14624.4,83],[14656.7,41],[14657,35],[14657,8],[14691.2,43],[14724.7,83],[14758.2,41],[14758.3,35],[14758.3,8],[14792.3,43],[14826.5,43],[14859.9,41],[14860,35],[14860,8],[14893.7,43],[14927.8,43],[14961.2,41],[14961.4,43],[14971.2,43],[14981.8,89],[14981.8,14],[14992.9,54],[14993,8],[15014.7,52],[15014.8,8],[15038.6,41],[15038.8,93],[15038.9,14],[15060.8,50],[15060.8,8],[15078.9,68],[15078.9,8],[15100.6,56],[15100.7,8],[15120.6,50],[15120.6,8],[15148.5,41],[15148.8,56],[15148.8,8],[15158.6,51],[15158.6,8],[15211.6,65],[15223,53],[15223.1,8],[15232,41],[15232.3,53],[15232.3,8],[15333.7,41],[15435.2,41],[15436.8,14],[15436.9,136],[15447.1,59],[15485.9,43],[15524.5,43],[15534.6,41],[15534.7,43],[15551,43],[15551.2,39],[15559.7,180]]} diff --git a/src/main/runtime/__fixtures__/codex-0-158-0-timed-turn.txt b/src/main/runtime/__fixtures__/codex-0-158-0-timed-turn.txt new file mode 100644 index 00000000000..f589f998bb8 --- /dev/null +++ b/src/main/runtime/__fixtures__/codex-0-158-0-timed-turn.txt @@ -0,0 +1 @@ +[?2004h[>4;0m[>7u[?1004h]10;?\]11;?\[?u[?2026h[?25l[?1049h[>4;0m[>7u[?1007l[?1000h[?1002h[?1006h[?1003h[?25l[?2026h[?25l>_ OpenAI Codex (v0.158.0)loadingShall we see where this goes?⣀⣤⣤⣤⣀⣀⣠⣶⣿⣿⣿⣿⣿⣿⣿⣿⣦⣤⣤⣤⣤⣤⣤⡀⢀⣾⣿⣿⠿⠋⠉⠉⢉⣭⣿⣿⣿⣿⣿⠿⣿⣿⣿⣿⣷⣄⣀⣾⣿⣿⠃⣀⣴⣾⣿⣿⡿⠟⠋⣀⡀⠈⠙⢿⣿⣿⣧⣀⣶⣿⣿⣿⣿⡇⢸⣿⣿⡿⠛⠉⢀⣠⣴⣿⣿⣿⣷⣦⣀⠈⢻⣿⣿⡇⣰⣿⣿⡿⢿⣿⣿⡇⢸⣿⣿⢀⣤⣶⣿⣿⣿⠟⠛⠻⣿⣿⣿⣿⣮⣿⣿⡷⢰⣿⣿⡟⠁⢸⣿⣿⡇⢸⣿⣿⣿⣿⠿⠿⣿⣿⣿⣦⣄⡀⠈⠛⠿⣿⣿⣿⣧⡀⣾⣿⣿⠃⢸⣿⣿⡇⢸⣿⣿⠋⠁⠈⠙⢻⣿⣿⣿⣶⣤⡀⠹⢿⣿⣷⡄⢸⣿⣿⣇⠸⣿⣿⣷⣦⣼⣿⣿⢸⣿⣿⠻⢿⣿⣿⡇⠘⣿⣿⣿⠈⢿⣿⣿⣦⡀⠈⠛⠿⣿⣿⣿⣿⣄⡀⢀⣠⣼⣿⣿⣿⣿⡇⣿⣿⣿⠇⢻⣿⣿⣿⣷⣦⣀⠈⠙⠻⣿⣿⣿⣶⣶⣿⣿⣿⣿⣿⣿⣿⡇⣠⣿⣿⣿⢸⣿⣿⡿⢿⣿⣿⣿⣦⣠⣴⣿⣿⣿⡿⠟⠋⢸⣿⣿⣿⣿⣷⣴⣿⣿⣿⠃⠘⣿⣿⣷⠈⠛⢿⣿⣿⣿⠿⠋⠉⣠⣴⣿⣿⣿⣿⣿⣿⣿⣿⠟⠁⠻⣿⣿⣿⣤⣀⠈⠉⢀⣤⣶⣿⣿⣿⠿⠟⠁⣰⣿⣿⡟⠋⠁⠈⠿⣿⣿⣿⣿⣶⣾⣿⣿⣿⣿⠟⠋⠁⣠⣼⣿⣿⡟⠙⠛⠛⠛⠻⠛⢿⣿⣿⣿⣿⣷⣾⣿⣿⣿⡿⠏⠈⠙⠛⠿⠿⠿⠿⠛⠉›Ask Codex to do anything?forshortcuts[0 q [?25h[?2026l[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l~/orca-lanes/sta8834/corpus/scratch permissions: YOLO modeShall we see where this goes?[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;scratch[?2026h[?25h[?2026l[?2026h[?25lGPT-6-Sol default·~/orca-lanes/sta8834/corpus/scratch[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠋ scratch]0;⠙ scratch[?2026h[?25lmdim · ~/orca-lanes/sta834/corpus/scratch[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25lList the files here and summarizein2bullets.[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25lAsk Codex to do anything?forshortcuts[?25h[?2026l[?2026h[?25l› Listthefileshereandsummarizein2bullets.[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠼ scratch[?2026h[?25l•Working(0s • esc to interrupt)[?25h[?2026l[?2026h[?25h[?2026l]0;⠴ scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠦ scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠧ scratch[?2026h[?25h[?2026l]0;⠧ ⠧ | scratch[?2026h[?25l·⠧[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠇ ⠇ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠏ ⠏ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠋ ⠋ | scratch[?2026h[?25l•[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠙ ⠙ | scratch[?2026h[?25l•[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠹ ⠹ | scratch[?2026h[?25l•[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠸ ⠸ | scratch[?2026h[?25l•[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠼ ⠼ | scratch[?2026h[?25l•[?25h[?2026l[?2026h[?25l1[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠴ ⠴ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠦ ⠦ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠧ ⠧ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠇ ⠇ | scratch[?2026h[?25l•[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠏ ⠏ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠋ ⠋ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠙ ⠙ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠹ ⠹ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠸ ⠸ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠼ ⠼ | scratch[?2026h[?25h[?2026l[?2026h[?25l2[?25h[?2026l[?2026h[?25h[?2026l]0;⠴ ⠴ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠦ ⠦ | scratch[?2026h[?25l• I’ll [?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25linspect[?25h[?2026l[?2026h[?25lthe[?25h[?2026l[?2026h[?25ldirectorycontents[?25h[?2026l]0;⠧ ⠧ | scratch[?2026h[?25land[?25h[?2026l[?2026h[?25lsummarize[?25h[?2026l[?2026h[?25lwhat[?25h[?2026l[?2026h[?25l’s[?25h[?2026l[?2026h[?25lpresent[?25h[?2026l[?2026h[?25lin[?25h[?2026l]0;⠇ ⠇ | scratch[?2026h[?25ltwo[?25h[?2026l[?2026h[?25lbullets[?25h[?2026l[?2026h[?25l.[?25h[?2026l]0;⠏ ⠏ | scratch[?2026h[?25l⠏[?25h[?2026l]0;⠋ ⠋ | scratch[?2026h[?25l⠋[?25h[?2026l[?2026h[?25l•Working(2s • esc to interrupt)[?25h[?2026l]0;⠙ ⠙ | scratch[?2026h[?25l•[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠹ ⠹ | scratch[?2026h[?25l•[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠸ ⠸ | scratch[?2026h[?25l•[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠼ ⠼ | scratch[?2026h[?25l•[?25h[?2026l[?2026h[?25l3[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠴ ⠴ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠦ ⠦ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠧ ⠧ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠇ ⠇ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠏ ⠏ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠋ ⠋ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠙ ⠙ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠹ ⠹ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠸ ⠸ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠼ ⠼ | scratch[?2026h[?25h[?2026l[?2026h[?25l•Explored └ Listrg--files-g'*'-g'.*' + Show details [?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l4[?25h[?2026l[?2026h[?25l⠼[?25h[?2026l[?2026h[?25h[?2026l]0;⠴ ⠴ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠦ ⠦ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠧ ⠧ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠇ ⠇ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠏ ⠏ | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠋ ⠋ | scratch[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l[?2026h[?25h[?2026l]0;⠙ ⠙ | scratch[?2026h[?25h[?2026l[?2026h[?25l•⠙[?25h[?2026l]0;⠙ scratch]0;⠙ List and summarize files | scratch[?2026h[?25lList and summarize files[?25h[?2026l[?2026h[?25h[?2026l]0;⠹ List and summarize files | scratch[?2026h[?25l•[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠸ List and summarize files | scratch[?2026h[?25l•[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠼ List and summarize files | scratch[?2026h[?25l•[?25h[?2026l[?2026h[?25l5[?25h[?2026l[?2026h[?25h[?2026l]0;⠴ List and summarize files | scratch[?2026h[?25l•[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠦ List and summarize files | scratch[?2026h[?25l•[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠧ List and summarize files | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠇ List and summarize files | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠏ List and summarize files | scratch[?2026h[?25l•[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠋ List and summarize files | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠙ List and summarize files | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠹ List and summarize files | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠸ List and summarize files | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠼ List and summarize files | scratch[?2026h[?25h[?2026l[?2026h[?25l6[?25h[?2026l[?2026h[?25h[?2026l]0;⠴ List and summarize files | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠦ List and summarize files | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠧ List and summarize files | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠇ List and summarize files | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠏ List and summarize files | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠋ List and summarize files | scratch[?2026h[?25l•[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠙ List and summarize files | scratch[?2026h[?25l•[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠹ List and summarize files | scratch[?2026h[?25l•[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠸ List and summarize files | scratch[?2026h[?25l•[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠼ List and summarize files | scratch[?2026h[?25l•[?25h[?2026l[?2026h[?25l7[?25h[?2026l[?2026h[?25l Read README.md,notes.txt + Show details [?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠴ List and summarize files | scratch[?2026h[?25l•[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠦ List and summarize files | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠧ List and summarize files | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠇ List and summarize files | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l•[?25h[?2026l]0;⠏ List and summarize files | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠋ List and summarize files | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠙ List and summarize files | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l• •` [?25h[?2026l[?2026h[?25lREADME[?25h[?2026l[?2026h[?25l.md[?25h[?2026l]0;⠹ List and summarize files | scratch[?2026h[?25lREADME.md[?25h[?2026l[?2026h[?25l—[?25h[?2026l[?2026h[?25lcontainsthe[?25h[?2026l[?2026h[?25lheading[?25h[?2026l[?2026h[?25l“[?25h[?2026l]0;⠸ List and summarize files | scratch[?2026h[?25lscratch[?25h[?2026l[?2026h[?25l.”[?25h[?2026l[?2026h[?25l•`[?25h[?2026l[?2026h[?25lnotes[?25h[?2026l]0;⠼ List and summarize files | scratch[?2026h[?25l.txt[?25h[?2026l]0;⠴ List and summarize files | scratch]0;⠦ List and summarize files | scratch[?2026h[?25lnotes.txt —containsthetext“hello[?25h[?2026l[?2026h[?25l.”[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;⠧ List and summarize files | scratch[?2026h[?25h[?2026l[?2026h[?25h[?2026l]0;List and summarize files | scratch[?2026h[?25l 9:46 PM [?25h[?2026l \ No newline at end of file diff --git a/src/main/runtime/__fixtures__/codex-0-158-0-trustprompt.meta.json b/src/main/runtime/__fixtures__/codex-0-158-0-trustprompt.meta.json new file mode 100644 index 00000000000..a80d88f5af9 --- /dev/null +++ b/src/main/runtime/__fixtures__/codex-0-158-0-trustprompt.meta.json @@ -0,0 +1,15 @@ +{ + "capturedAt": "2026-09-29T01:32:55.701Z", + "platform": "darwin", + "command": [ + "codex", + "--no-daemon", + "-c", + "check_for_update_on_startup=false", + "--dangerously-bypass-approvals-and-sandbox" + ], + "cols": 120, + "rows": 40, + "note": "codex-cli 0.158.0: launch in an untrusted folder; the recording ends on the unanswered trust dialog. STA-8834.", + "exitCode": 0 +} diff --git a/src/main/runtime/__fixtures__/codex-0-158-0-trustprompt.txt b/src/main/runtime/__fixtures__/codex-0-158-0-trustprompt.txt new file mode 100644 index 00000000000..fd002b0fe04 --- /dev/null +++ b/src/main/runtime/__fixtures__/codex-0-158-0-trustprompt.txt @@ -0,0 +1 @@ +[?2004h[>4;0m[>7u[?1004h]10;?\]11;?\[?u[?2026h[?25l[?1049h[>4;0m[>7u[?1007l[?1000h[?1002h[?1006h[?1003h[?25l[?2026h[?25l>_ OpenAI Codex (v0.158.0)loadingHello, world. Hello, you.⣀⣤⣤⣤⣀⣀⣠⣶⣿⣿⣿⣿⣿⣿⣿⣿⣦⣤⣤⣤⣤⣤⣤⡀⢀⣾⣿⣿⠿⠋⠉⠉⢉⣭⣿⣿⣿⣿⣿⠿⣿⣿⣿⣿⣷⣄⣀⣾⣿⣿⠃⣀⣴⣾⣿⣿⡿⠟⠋⣀⡀⠈⠙⢿⣿⣿⣧⣀⣶⣿⣿⣿⣿⡇⢸⣿⣿⡿⠛⠉⢀⣠⣴⣿⣿⣿⣷⣦⣀⠈⢻⣿⣿⡇⣰⣿⣿⡿⢿⣿⣿⡇⢸⣿⣿⢀⣤⣶⣿⣿⣿⠟⠛⠻⣿⣿⣿⣿⣮⣿⣿⡷⢰⣿⣿⡟⠁⢸⣿⣿⡇⢸⣿⣿⣿⣿⠿⠿⣿⣿⣿⣦⣄⡀⠈⠛⠿⣿⣿⣿⣧⡀⣾⣿⣿⠃⢸⣿⣿⡇⢸⣿⣿⠋⠁⠈⠙⢻⣿⣿⣿⣶⣤⡀⠹⢿⣿⣷⡄⢸⣿⣿⣇⠸⣿⣿⣷⣦⣼⣿⣿⢸⣿⣿⠻⢿⣿⣿⡇⠘⣿⣿⣿⠈⢿⣿⣿⣦⡀⠈⠛⠿⣿⣿⣿⣿⣄⡀⢀⣠⣼⣿⣿⣿⣿⡇⣿⣿⣿⠇⢻⣿⣿⣿⣷⣦⣀⠈⠙⠻⣿⣿⣿⣶⣶⣿⣿⣿⣿⣿⣿⣿⡇⣠⣿⣿⣿⢸⣿⣿⡿⢿⣿⣿⣿⣦⣠⣴⣿⣿⣿⡿⠟⠋⢸⣿⣿⣿⣿⣷⣴⣿⣿⣿⠃⠘⣿⣿⣷⠈⠛⢿⣿⣿⣿⠿⠋⠉⣠⣴⣿⣿⣿⣿⣿⣿⣿⣿⠟⠁⠻⣿⣿⣿⣤⣀⠈⠉⢀⣤⣶⣿⣿⣿⠿⠟⠁⣰⣿⣿⡟⠋⠁⠈⠿⣿⣿⣿⣿⣶⣾⣿⣿⣿⣿⠟⠋⠁⣠⣼⣿⣿⡟⠙⠛⠛⠛⠻⠛⢿⣿⣿⣿⣿⣷⣾⣿⣿⣿⡿⠏⠈⠙⠛⠿⠿⠿⠿⠛⠉›Ask Codex to do anything?forshortcuts[0 q [?25h[?2026l[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25l~/orca-lanes/sta8834/corpus/scratch permissions: YOLO modeHello, world. Hello, you.[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?2026h[?25h[?2026l[?1006l[?1015l[?1003l[?1002l[?1000l[?1007h[?2026h[?25l Folder access/Users/xxxxxx/orca-lanes/sta8834/corpus/scratch  Trustthisfolder?Codexcanread,edit,andrunfileshere,subjecttoyourpermissionsettings.Foldersettingscan run code automatically,evenwithoutamodelrequest.Continueonlyifyoutrustthesefiles.Yourtrustdecisionwillbesaved.› 1. Trust and continue 2.Quitenter continue · esc quit [?2026l \ No newline at end of file diff --git a/src/main/runtime/agent-transcript-replay-test-harness.ts b/src/main/runtime/agent-transcript-replay-test-harness.ts new file mode 100644 index 00000000000..5b57656ab4a --- /dev/null +++ b/src/main/runtime/agent-transcript-replay-test-harness.ts @@ -0,0 +1,56 @@ +// Replays captured PTY bytes the way onPtyData does, for suites asserting a rule on every frame. +import { readFileSync } from 'node:fs' +import { join } from 'node:path' +import { HeadlessEmulator } from '../daemon/headless-emulator' +import { projectTerminalVisibleLines } from './orca-runtime-terminal-projection' +import { normalizeTerminalChunk } from './terminal-ansi-normalization' +import { appendNormalizedToTailBuffer } from './terminal-tail-buffer' +import { buildPreview } from './terminal-tail-state' +import { buildTerminalWaitText } from './terminal-wait-tail-state' + +const DEFAULT_CHUNK_CHARS = 64 + +export type TranscriptReplayFrame = { screenLines: string[]; waitText: string } + +export function readRuntimeFixture(name: string): string { + return readFileSync(join(__dirname, '__fixtures__', `${name}.txt`), 'utf8') +} + +/** A string is cut into fixed 64-char chunks; an array replays the recorded PTY chunks as-is. */ +export async function* replayTranscript( + data: string | readonly string[], + cols: number, + rows: number +): AsyncGenerator { + const chunks = typeof data === 'string' ? splitIntoChunks(data) : data + const emulator = new HeadlessEmulator({ cols, rows }) + let lines: string[] = [] + let partialLine = '' + let pendingAnsi = '' + let redrawCursor: ReturnType['redrawCursor'] = null + try { + for (const chunk of chunks) { + await emulator.write(chunk) + const normalized = normalizeTerminalChunk(chunk, pendingAnsi) + pendingAnsi = normalized.pendingAnsi + const tail = appendNormalizedToTailBuffer(lines, partialLine, normalized.text, redrawCursor) + lines = tail.lines + partialLine = tail.partialLine + redrawCursor = tail.redrawCursor + yield { + screenLines: projectTerminalVisibleLines(emulator).lines, + waitText: buildTerminalWaitText(lines, partialLine, buildPreview(lines, partialLine)) + } + } + } finally { + emulator.dispose() + } +} + +function splitIntoChunks(data: string): string[] { + const chunks: string[] = [] + for (let offset = 0; offset < data.length; offset += DEFAULT_CHUNK_CHARS) { + chunks.push(data.slice(offset, offset + DEFAULT_CHUNK_CHARS)) + } + return chunks +} diff --git a/src/main/runtime/codex-header-readiness-transcripts.test.ts b/src/main/runtime/codex-header-readiness-transcripts.test.ts index 6cb3c08179f..0cfcf548017 100644 --- a/src/main/runtime/codex-header-readiness-transcripts.test.ts +++ b/src/main/runtime/codex-header-readiness-transcripts.test.ts @@ -1,14 +1,11 @@ -import { readFileSync } from 'node:fs' -import { join } from 'node:path' import { describe, expect, it, vi } from 'vitest' -import { HeadlessEmulator } from '../daemon/headless-emulator' import { createTranscriptPane } from './agent-transcript-pane-test-harness' -import { projectTerminalVisibleLines } from './orca-runtime-terminal-projection' -import { normalizeTerminalChunk } from './terminal-ansi-normalization' -import { appendNormalizedToTailBuffer } from './terminal-tail-buffer' -import { buildPreview } from './terminal-tail-state' +import { + readRuntimeFixture, + replayTranscript, + type TranscriptReplayFrame +} from './agent-transcript-replay-test-harness' import { isKnownReadyPromptBody, isKnownReadyPromptPreview } from './terminal-wait-detection' -import { buildTerminalWaitText } from './terminal-wait-tail-state' vi.mock('electron', () => ({ BrowserWindow: { fromId: vi.fn(() => null) }, @@ -23,44 +20,14 @@ const EFFORT_OVERRIDE = 'codex-0157-effort-override-embedded-warning' const CONFIG_OVERRIDE = 'codex-0157-config-override-embedded-warning' const NO_DAEMON = 'codex-0157-no-daemon-effort-override' const ALL_FIXTURES = [PLAIN, EFFORT_OVERRIDE, CONFIG_OVERRIDE, NO_DAEMON] -const CHUNK_CHARS = 64 -function readFixture(name: string): string { - return readFileSync(join(__dirname, '__fixtures__', `${name}.txt`), 'utf8') -} - -type ReplayFrame = { screenLines: string[]; waitText: string } - -/** Feeds the bytes the way onPtyData does: one emulator grid, one line-folded wait text. */ -async function* replay(data: string, cols: number, rows: number): AsyncGenerator { - const emulator = new HeadlessEmulator({ cols, rows }) - let lines: string[] = [] - let partialLine = '' - let pendingAnsi = '' - let redrawCursor: ReturnType['redrawCursor'] = null - try { - for (let offset = 0; offset < data.length; offset += CHUNK_CHARS) { - const chunk = data.slice(offset, offset + CHUNK_CHARS) - await emulator.write(chunk) - const normalized = normalizeTerminalChunk(chunk, pendingAnsi) - pendingAnsi = normalized.pendingAnsi - const tail = appendNormalizedToTailBuffer(lines, partialLine, normalized.text, redrawCursor) - lines = tail.lines - partialLine = tail.partialLine - redrawCursor = tail.redrawCursor - yield { - screenLines: projectTerminalVisibleLines(emulator).lines, - waitText: buildTerminalWaitText(lines, partialLine, buildPreview(lines, partialLine)) - } - } - } finally { - emulator.dispose() - } -} - -async function finalFrame(name: string, cols: number, rows: number): Promise { - let last: ReplayFrame | null = null - for await (const frame of replay(readFixture(name), cols, rows)) { +async function finalFrame( + name: string, + cols: number, + rows: number +): Promise { + let last: TranscriptReplayFrame | null = null + for await (const frame of replayTranscript(readRuntimeFixture(name), cols, rows)) { last = frame } if (!last) { @@ -89,8 +56,8 @@ describe('Codex 0.157 header readiness from captured bytes', () => { '%s: the screen never adds readiness while loading, and is ready at the final screen', async (name) => { let sawLoadingHeader = false - let last: ReplayFrame | null = null - for await (const frame of replay(readFixture(name), 120, 40)) { + let last: TranscriptReplayFrame | null = null + for await (const frame of replayTranscript(readRuntimeFixture(name), 120, 40)) { if (screenShowsLoadingHeader(frame.screenLines)) { sawLoadingHeader = true expect(isKnownReadyPromptBody('', 'codex', () => frame.screenLines)).toBe(false) @@ -113,7 +80,7 @@ describe('Codex 0.157 header readiness from captured bytes', () => { [60, 5] ])('at %ix%i the screen never takes readiness away from the text rules', (cols, rows) => { it.each(ALL_FIXTURES)('%s', async (name) => { - for await (const frame of replay(readFixture(name), cols, rows)) { + for await (const frame of replayTranscript(readRuntimeFixture(name), cols, rows)) { if (isKnownReadyPromptPreview(frame.waitText)) { expect(isKnownReadyPromptBody(frame.waitText, 'codex', () => frame.screenLines)).toBe( true @@ -191,7 +158,7 @@ describe('Codex 0.157 header readiness from captured bytes', () => { paneTitle: 'Terminal', foregroundProcess: 'codex', launchAgent: 'codex', - data: readFixture(name), + data: readRuntimeFixture(name), size }) } diff --git a/src/main/runtime/codex-quiet-ready-screen.test.ts b/src/main/runtime/codex-quiet-ready-screen.test.ts new file mode 100644 index 00000000000..50052365905 --- /dev/null +++ b/src/main/runtime/codex-quiet-ready-screen.test.ts @@ -0,0 +1,372 @@ +import { readFileSync } from 'node:fs' +import { join } from 'node:path' +import { afterEach, describe, expect, it, vi } from 'vitest' +import type { TuiAgent } from '../../shared/tui-agent' +import { createTranscriptPane } from './agent-transcript-pane-test-harness' +import { + readRuntimeFixture, + replayTranscript, + type TranscriptReplayFrame +} from './agent-transcript-replay-test-harness' +import { isCodexComposerReadyScreen } from './codex-terminal-readiness' +import { + detectTerminalWaitBlockedReason, + isKnownReadyPromptBody, + isQuietReadyScreenBody +} from './terminal-wait-detection' +import { + evaluateTuiIdle, + hasQuietReadyScreen, + isTuiIdleReadyVerdict, + type TuiIdleEvaluationInput +} from './tui-idle-evidence' + +vi.mock('electron', () => ({ + BrowserWindow: { fromId: vi.fn(() => null) }, + webContents: { fromId: vi.fn(() => null) }, + ipcMain: { on: vi.fn(), removeListener: vi.fn() }, + app: { getPath: vi.fn(() => '/tmp') } +})) + +const QUIESCENCE_MS = 3000 + +// codex-cli recordings at 120x40 (see each .meta.json); STA-8834. Each launches, runs a turn, +// and ends idle; the timed ones also replay as plain strings here. 0.157 idles via STA-8628's. +const TIMED_FIXTURES = ['codex-0-155-1-timed-turn', 'codex-0-158-0-timed-turn'] +const SETTLED_IDLE_FIXTURES = ['codex-0-150-1-turn', ...TIMED_FIXTURES] +const DIALOG_FIXTURES = [ + 'codex-0-157-1-update-dialog', + 'codex-0-158-0-approval', + 'codex-0-158-0-trustprompt' +] +const STA_8628_FIXTURES = [ + 'codex-0157-plain-ready', + 'codex-0157-effort-override-embedded-warning', + 'codex-0157-config-override-embedded-warning', + 'codex-0157-no-daemon-effort-override' +] + +const BUSY_STATUS_RE = /to interrupt\)/ +const EMPTY_COMPOSER_RE = /^› ask codex to do anything\s*$/m +const HEADER_LOADING_RE = /(?:model|directory):\s+loading|^\s*loading\s*$/m +const DIALOG_RE = + /update available|do you trust|trust this folder|would you like to run|press enter to confirm|enter continue/ + +function screenOf(frame: TranscriptReplayFrame): string { + return frame.screenLines.join('\n').toLowerCase() +} + +async function collectFrames( + data: string | readonly string[], + cols = 120, + rows = 40 +): Promise { + const frames: TranscriptReplayFrame[] = [] + for await (const frame of replayTranscript(data, cols, rows)) { + frames.push(frame) + } + return frames +} + +describe('Codex composer ready screen, frame by frame', () => { + it.each([...SETTLED_IDLE_FIXTURES, ...DIALOG_FIXTURES])( + '%s: never ready while loading, mid-turn, or under a drawn dialog', + async (name) => { + const seen = { loading: 0, busy: 0, dialog: 0 } + for (const frame of await collectFrames(readRuntimeFixture(name))) { + const screen = screenOf(frame) + // Why only once the composer is gone: a half-drawn dialog keeps it for a few frames, + // which quiescence absorbs; a drawn dialog replaces it. + const kind = HEADER_LOADING_RE.test(screen) + ? 'loading' + : BUSY_STATUS_RE.test(screen) + ? 'busy' + : DIALOG_RE.test(screen) && !EMPTY_COMPOSER_RE.test(screen) + ? 'dialog' + : null + if (kind) { + seen[kind] += 1 + expect({ kind, ready: isCodexComposerReadyScreen(screenOf(frame)) }).toEqual({ + kind, + ready: false + }) + } + } + // Presence preconditions: each fixture exercises the states it was recorded for. + expect(seen.loading).toBeGreaterThan(0) + if (DIALOG_FIXTURES.includes(name)) { + expect(seen.dialog).toBeGreaterThan(0) + } else { + expect(seen.busy).toBeGreaterThan(0) + } + }, + 30_000 + ) + + it.each([...SETTLED_IDLE_FIXTURES, ...STA_8628_FIXTURES])( + '%s: ready on the final idle screen', + async (name) => { + const frames = await collectFrames(readRuntimeFixture(name)) + expect(isCodexComposerReadyScreen(screenOf(frames.at(-1)!))).toBe(true) + } + ) + + it.each(DIALOG_FIXTURES)('%s: not ready while the dialog owns the screen', async (name) => { + const frames = await collectFrames(readRuntimeFixture(name)) + expect(isCodexComposerReadyScreen(screenOf(frames.at(-1)!))).toBe(false) + }) + + it('is not ready without a live screen', () => { + expect(isQuietReadyScreenBody('', 'codex', () => null)).toBe(false) + }) + + it('reads the placeholder only as the composer line, not quoted mid-line', () => { + const quoted = ['$ grep placeholder notes.txt', 'the box says › Ask Codex to do anything', '$'] + expect(isQuietReadyScreenBody('', 'codex', () => quoted)).toBe(false) + }) + + it('reads the busy row only above the composer, not a status row quoted in the answer', () => { + const screenLines = [ + '>_ OpenAI Codex (v0.158.0)', + ' ~/repo', + '', + '› what does the status row look like mid-turn?', + '', + '• It reads like this:', + '', + ' • Working (0s • esc to interrupt)', + '', + ' The timer counts up until the turn ends, and the row', + ' disappears once the answer is complete.', + '', + '› Ask Codex to do anything', + '', + ' gpt-5.6-sol medium · ~/repo', + ' ? for shortcuts' + ] + expect(isQuietReadyScreenBody('', 'codex', () => screenLines)).toBe(true) + const composer = screenLines.indexOf('› Ask Codex to do anything') + const busy = [ + ...screenLines.slice(0, composer), + '• Working (3s • esc to interrupt)', + ' └ Tip: start a fresh idea with /new', + '', + ...screenLines.slice(composer) + ] + expect(isQuietReadyScreenBody('', 'codex', () => busy)).toBe(false) + }) + + it("reads 0.158's turn timestamp above the composer as the end of a quoted status row", () => { + // Live 0.158 screen after a worker answered with a status row verbatim (STA-8834). + const screenLines = [ + ' === TASK ===', + ' Reply with exactly this line and nothing else: • Working (0s • esc to interrupt) — then call worker_done.', + '• • Working (0s • esc to interrupt)', + '• Ran orca-dev orchestration send --from term_f496fcd2-a874-4fa6-a9bd-550a515ac928 --dispatch-capability dcap_PTgPpvf-B…', + ' └ Sent msg_ff7be3f25d7e', + ' + Show details', + '• • Working (0s • esc to interrupt)', + ' 11:15 PM', + '› Ask Codex to do anything', + ' GPT-6-Sol medium · ~/orca-lanes/sta8834/live3/scratch · Report task outcome', + ' ? for shortcuts' + ] + expect(isQuietReadyScreenBody('', 'codex', () => screenLines)).toBe(true) + }) + + it('settles a quiet composer under an answer asking "Would you like to proceed?"', () => { + const screenLines = [ + '>_ OpenAI Codex (v0.158.0)', + ' ~/repo', + '', + '› tidy the README', + '', + '• Done. Would you like to proceed with the changelog too?', + '', + '› Ask Codex to do anything', + '', + ' ? for shortcuts' + ] + const waitText = screenLines.join('\n') + const verdict = evaluateTuiIdle({ + record: { lastAgentStatus: null, lastOutputAt: 0, lastOscTitle: null }, + readTailBlockedReason: () => detectTerminalWaitBlockedReason(waitText), + readPositiveBodyEvidence: () => isKnownReadyPromptBody(waitText, 'codex', () => screenLines), + readQuietReadyBodyEvidence: () => + isQuietReadyScreenBody(waitText, 'codex', () => screenLines), + agent: 'codex', + firstPartyStatus: null, + quiescenceMs: QUIESCENCE_MS + }) + expect(verdict.kind).toBe('ready-strong') + }) +}) + +type Timing = { promptSentAtMs: number; chunks: [number, number][] } + +function readTimedFixture(name: string): { chunks: string[]; times: number[]; promptAt: number } { + const data = readRuntimeFixture(name) + const timing: Timing = JSON.parse( + readFileSync(join(__dirname, '__fixtures__', `${name}.timing.json`), 'utf8') + ) + const chunks: string[] = [] + let offset = 0 + for (const [, length] of timing.chunks) { + chunks.push(data.slice(offset, offset + length)) + offset += length + } + expect(offset).toBe(data.length) + return { chunks, times: timing.chunks.map(([at]) => at), promptAt: timing.promptSentAtMs } +} + +describe('the quiet lane over recorded chunk timing (default animations)', () => { + afterEach(() => { + vi.useRealTimers() + }) + + it.each(TIMED_FIXTURES)( + '%s: never settles mid-turn, and settles once the finished turn is quiet', + async (name) => { + const { chunks, times, promptAt } = readTimedFixture(name) + const frames = await collectFrames(chunks) + // Why after the replay: the emulator's write flush runs on real timers. + vi.useFakeTimers() + const lastBusy = frames.findLastIndex((frame) => BUSY_STATUS_RE.test(screenOf(frame))) + const firstTurnChunk = times.findIndex((at) => at >= promptAt) + expect(lastBusy).toBeGreaterThan(firstTurnChunk) + // The latest moment each frame stays on screen: just before the next chunk lands. + const settlesAt = (index: number, now: number): boolean => { + vi.setSystemTime(now) + return hasQuietReadyScreen( + { lastAgentStatus: null, lastOutputAt: times[index]!, lastOscTitle: null }, + 'codex', + () => + isQuietReadyScreenBody( + frames[index]!.waitText, + 'codex', + () => frames[index]!.screenLines + ), + QUIESCENCE_MS + ) + } + let readyBodyMidTurn = 0 + for (let index = firstTurnChunk; index <= lastBusy; index += 1) { + if (isCodexComposerReadyScreen(screenOf(frames[index]!))) { + readyBodyMidTurn += 1 + } + expect({ index, settles: settlesAt(index, times[index + 1]! - 1) }).toEqual({ + index, + settles: false + }) + } + // Presence precondition: the body alone does show mid-turn, so quiescence is load-bearing. + expect(readyBodyMidTurn).toBeGreaterThan(0) + const last = frames.length - 1 + // Why +1: the fake clock keeps whole milliseconds; the recorded times do not. + expect(settlesAt(last, times[last]! + QUIESCENCE_MS + 1)).toBe(true) + }, + 120_000 + ) +}) + +describe('never less ready than origin/main', () => { + const records = [ + { lastAgentStatus: null, lastOutputAt: 0, lastOscTitle: null }, + { lastAgentStatus: 'idle' as const, lastOutputAt: 0, lastOscTitle: 'codex' }, + { lastAgentStatus: 'working' as const, lastOutputAt: 0, lastOscTitle: '⠋ repo' } + ] + describe.each([ + [120, 40], + [80, 24] + ])('at %ix%i', (cols, rows) => { + it.each([...SETTLED_IDLE_FIXTURES, ...DIALOG_FIXTURES, ...STA_8628_FIXTURES])( + '%s', + async (name) => { + for (const frame of await collectFrames(readRuntimeFixture(name), cols, rows)) { + for (const agent of ['codex', null] as const) { + const base = { + readTailBlockedReason: () => detectTerminalWaitBlockedReason(frame.waitText), + readPositiveBodyEvidence: () => + isKnownReadyPromptBody(frame.waitText, agent, () => frame.screenLines), + agent, + firstPartyStatus: null, + quiescenceMs: QUIESCENCE_MS + } satisfies Omit + for (const record of records) { + const before = evaluateTuiIdle({ + ...base, + record, + // Why a withheld screen: that leaves exactly main's Muse lane, the only widening. + readQuietReadyBodyEvidence: () => + isQuietReadyScreenBody(frame.waitText, agent, () => null) + }) + const after = evaluateTuiIdle({ + ...base, + record, + readQuietReadyBodyEvidence: () => + isQuietReadyScreenBody(frame.waitText, agent, () => frame.screenLines) + }) + if (isTuiIdleReadyVerdict(before)) { + expect(isTuiIdleReadyVerdict(after)).toBe(true) + } + } + } + } + }, + 60_000 + ) + }) +}) + +describe('agent gate', () => { + const placeholderScreen = ['› Ask Codex to do anything', ' ? for shortcuts'] + + it("never reads another agent's screen, even one showing Codex's placeholder", () => { + const readScreenLines = vi.fn(() => placeholderScreen) + for (const agent of ['claude', 'muse', 'gemini'] as const) { + expect(isQuietReadyScreenBody('', agent, readScreenLines)).toBe(false) + } + expect(readScreenLines).not.toHaveBeenCalled() + expect(isQuietReadyScreenBody('', 'codex', readScreenLines)).toBe(true) + }) + + it('leaves an agent-unknown pane showing a cat-ed Codex transcript pending', () => { + const catted = ['$ cat session.log', '› Ask Codex to do anything', ' ? for shortcuts', '$ '] + const readScreenLines = vi.fn(() => catted) + expect(isQuietReadyScreenBody(catted.join('\n'), null, readScreenLines)).toBe(false) + expect(readScreenLines).not.toHaveBeenCalled() + expect(isQuietReadyScreenBody('', 'codex', readScreenLines)).toBe(true) + }) +}) + +describe('through the runtime', () => { + // Why 0.158 alone: its header carries no `model:`, so only this lane settles it. + const CODEX_0158 = 'codex-0-158-0-timed-turn' + async function pane(name: string, launchAgent: TuiAgent, size?: { cols: number; rows: number }) { + return createTranscriptPane({ + paneTitle: 'Terminal', + foregroundProcess: launchAgent, + launchAgent, + data: readRuntimeFixture(name), + size + }) + } + + // Why 8s: quiescence (3s) plus the 2s poll re-reading the grid. + it('codex 0.158: a tui-idle wait settles once the composer is quiet', async () => { + const { runtime, handle } = await pane(CODEX_0158, 'codex', { cols: 120, rows: 40 }) + await expect( + runtime.waitForTerminal(handle, { condition: 'tui-idle', timeoutMs: 8_000 }) + ).resolves.toMatchObject({ condition: 'tui-idle', satisfied: true }) + }, 15_000) + + it('keeps a Claude pane showing the same screen pending', async () => { + const { runtime, handle } = await pane(CODEX_0158, 'claude', { + cols: 120, + rows: 40 + }) + await expect( + runtime.waitForTerminal(handle, { condition: 'tui-idle', timeoutMs: 6_000 }) + ).rejects.toThrow(/timeout/) + }, 15_000) +}) diff --git a/src/main/runtime/codex-terminal-readiness.ts b/src/main/runtime/codex-terminal-readiness.ts new file mode 100644 index 00000000000..3b15c3359df --- /dev/null +++ b/src/main/runtime/codex-terminal-readiness.ts @@ -0,0 +1,63 @@ +// Why both shapes: 0.150-0.157 paint `model: loading` in a box, 0.158 a bare `loading` under the title. +const CODEX_HEADER_LOADING_RE = /(?:model|directory):\s+loading|^\s*loading\s*$/m +// Why a line cap: 0.158 draws no box, so nothing else ends its header before the chat. +const CODEX_HEADER_LINES = 6 +// Why the whole line: a pager, a `cat`ed transcript, or chat can quote the placeholder mid-line. +const CODEX_EMPTY_COMPOSER_RE = /^› ask codex to do anything\s*$/ +// Why not "working": reasoning summaries replace it, and a remapped key still ends this way. +const CODEX_BUSY_STATUS_MARKER = 'to interrupt)' +// Why only a tip: it is the one line Codex draws between its status row and the composer (120x40 corpus). +const CODEX_STATUS_TIP_PREFIX = '└ tip:' + +// Why the header only: chat below it can mention "OpenAI Codex" or `model: loading`. +function findCodexHeader(screen: string): { index: number; text: string } | null { + const index = screen.indexOf('openai codex') + if (index === -1) { + return null + } + const boxEnd = screen.indexOf('╰', index) + const text = screen + .slice(index, boxEnd === -1 ? undefined : boxEnd) + .split('\n', CODEX_HEADER_LINES) + .join('\n') + return { index, text } +} + +/** Tier 1: the 0.150-0.157 header, which only a grid reassembles (see isKnownReadyPromptBody). */ +export function findCodexScreenReadyPromptIndex(screen: string): number | null { + const header = findCodexHeader(screen) + return header !== null && + header.text.includes('model:') && + header.text.includes('directory:') && + !CODEX_HEADER_LOADING_RE.test(header.text) + ? header.index + : null +} + +/** + * Tier 1b, codex panes only: the empty composer with no busy status row just above it and no + * header load. Codex 0.158 dropped `model:`/`directory:`, and a long session scrolls the header + * away, so this is its only version-stable rest body. No dialog check: every Codex dialog + * replaces the composer, while an answer ending "Would you like to…?" must not block the lane. + * The mid-turn guard is the caller's quiescence, fed by the ~100 ms title spinner and status + * timer; `tui.animations=false` (set by a screen reader), `tui.effects.progress=false`, or a + * `tui.terminal_title` without activity/spinner removes it. + */ +export function isCodexComposerReadyScreen(screen: string): boolean { + const lines = screen.split('\n') + const composer = lines.findLastIndex((line) => CODEX_EMPTY_COMPOSER_RE.test(line)) + if (composer === -1 || hasBusyStatusRowAbove(lines, composer)) { + return false + } + const header = findCodexHeader(screen) + return header === null || !CODEX_HEADER_LOADING_RE.test(header.text) +} + +// Why only the row above the composer: a finished answer (or one above 0.158's timestamp) can quote it. +function hasBusyStatusRowAbove(lines: readonly string[], composer: number): boolean { + const above = lines.slice(0, composer).filter((line) => line.trim() !== '') + const row = above.at(-1)?.trimStart().startsWith(CODEX_STATUS_TIP_PREFIX) + ? above.at(-2) + : above.at(-1) + return row?.includes(CODEX_BUSY_STATUS_MARKER) ?? false +} diff --git a/src/main/runtime/terminal-wait-detection.ts b/src/main/runtime/terminal-wait-detection.ts index bb102a3e7b8..1540eef2d5f 100644 --- a/src/main/runtime/terminal-wait-detection.ts +++ b/src/main/runtime/terminal-wait-detection.ts @@ -8,6 +8,10 @@ import { import type { RuntimeTerminalWaitBlockedReason } from '../../shared/runtime-types' import type { TuiAgent } from '../../shared/tui-agent' import { findAntigravityReadyPromptIndex } from './antigravity-terminal-readiness' +import { + findCodexScreenReadyPromptIndex, + isCodexComposerReadyScreen +} from './codex-terminal-readiness' import { startOfLastLines, startOfLastNonBlankLines } from './terminal-wait-tail-window' const EXPLICIT_IDLE_TITLE_RE = /(^|\s)(ready|idle|done)(\s|$|[.!?])/i @@ -72,12 +76,29 @@ export function isKnownReadyPromptBody( if (agent !== null && agent !== 'codex') { return false } - const screenLines = readScreenLines() - if (screenLines === null) { - return false + const screen = readScreen(readScreenLines) + return screen !== null && isReadyPromptUnblocked(screen, findCodexScreenReadyPromptIndex(screen)) +} + +/** + * Tier 1b body evidence: a ready screen from an agent with no title rest signal. Unlike tier 1 + * it only proves the TUI is up, so the ranking holds it to quiescence. + * Why codex panes only: a `cat`ed transcript or pager in an unknown pane can show the composer. + */ +export function isQuietReadyScreenBody( + waitText: string, + agent: TuiAgent | null, + readScreenLines: () => readonly string[] | null +): boolean { + if (agent === 'codex') { + const screen = readScreen(readScreenLines) + return screen !== null && isCodexComposerReadyScreen(screen) } - const screen = screenLines.join('\n').toLowerCase() - return isReadyPromptUnblocked(screen, findCodexScreenReadyPromptIndex(screen)) + return (agent === null || agent === 'muse') && isMuseReadyPromptPreview(waitText) +} + +function readScreen(readScreenLines: () => readonly string[] | null): string | null { + return readScreenLines()?.join('\n').toLowerCase() ?? null } function isReadyPromptUnblocked(normalized: string, readyIndex: number | null): boolean { @@ -88,8 +109,6 @@ function isReadyPromptUnblocked(normalized: string, readyIndex: number | null): return blockedSignal === null || blockedSignal.index <= readyIndex } -// Why separate from isKnownReadyPromptPreview: that one settles tier 1 immediately, while -// a Muse ready screen only proves the TUI is up — the ranking holds it to quiescence. export function isMuseReadyPromptPreview(preview: string): boolean { const normalized = preview.toLowerCase() return isReadyPromptUnblocked(normalized, findMuseReadyPromptIndex(normalized)) @@ -179,24 +198,6 @@ function findCodexReadyPromptIndex(normalized: string): number | null { return readySegment.includes('model:') && readySegment.includes('directory:') ? headerIndex : null } -const CODEX_HEADER_LOADING_RE = /(?:model|directory):\s+loading/ - -// Why the header box only: chat below it can mention "OpenAI Codex" or `model: loading`. -// Why `loading`: a header still loading is not ready; the screen must not add readiness early. -function findCodexScreenReadyPromptIndex(screen: string): number | null { - const headerIndex = screen.indexOf('openai codex') - if (headerIndex === -1) { - return null - } - const boxEnd = screen.indexOf('╰', headerIndex) - const header = screen.slice(headerIndex, boxEnd === -1 ? undefined : boxEnd) - return header.includes('model:') && - header.includes('directory:') && - !CODEX_HEADER_LOADING_RE.test(header) - ? headerIndex - : null -} - export const TERMINAL_WAIT_BLOCKED_SENTINEL_RE = /update available|choose working directory to|codex just got an upgrade|hooks need review|do you trust|trust this|trusted workspace|press enter to (?:confirm|continue|view|insert)|press t to trust|permission required|requires permission|allow once|allow always|run this command\?/i diff --git a/src/main/runtime/tui-idle-evidence.test.ts b/src/main/runtime/tui-idle-evidence.test.ts index de9e955099c..ee8e908c61b 100644 --- a/src/main/runtime/tui-idle-evidence.test.ts +++ b/src/main/runtime/tui-idle-evidence.test.ts @@ -7,8 +7,8 @@ import { isKnownReadyPromptBody } from './terminal-wait-detection' import { evaluateTuiIdle, hasFreshDoneFirstPartyStatus, + hasQuietReadyScreen, isTuiIdleReadyVerdict, - hasQuietMuseReadyPrompt, nameOnlyIdleNeedsCorroboration, type TuiIdleEvaluationInput, type TuiIdleEvidenceRecord @@ -30,7 +30,7 @@ function input(overrides: Partial = {}): TuiIdleEvaluati record: record(), readTailBlockedReason: () => null, readPositiveBodyEvidence: () => false, - readMuseReadyBodyEvidence: () => true, + readQuietReadyBodyEvidence: () => true, agent: 'muse', firstPartyStatus: null, quiescenceMs: QUIESCENCE_MS, @@ -38,39 +38,38 @@ function input(overrides: Partial = {}): TuiIdleEvaluati } } -describe('hasQuietMuseReadyPrompt', () => { +describe('hasQuietReadyScreen', () => { it('settles a Muse ready screen once the stream has gone quiet', () => { - expect(hasQuietMuseReadyPrompt(record(), 'muse', () => true, QUIESCENCE_MS)).toBe(true) + expect(hasQuietReadyScreen(record(), 'muse', () => true, QUIESCENCE_MS)).toBe(true) }) it('refuses while the pane is still streaming', () => { expect( - hasQuietMuseReadyPrompt( - record({ lastOutputAt: Date.now() }), - 'muse', - () => true, - QUIESCENCE_MS - ) + hasQuietReadyScreen(record({ lastOutputAt: Date.now() }), 'muse', () => true, QUIESCENCE_MS) ).toBe(false) }) it('refuses without an output clock, like the tier-3 lane', () => { expect( - hasQuietMuseReadyPrompt(record({ lastOutputAt: null }), 'muse', () => true, QUIESCENCE_MS) + hasQuietReadyScreen(record({ lastOutputAt: null }), 'muse', () => true, QUIESCENCE_MS) ).toBe(false) }) it('refuses without a ready screen', () => { - expect(hasQuietMuseReadyPrompt(record(), 'muse', () => false, QUIESCENCE_MS)).toBe(false) + expect(hasQuietReadyScreen(record(), 'muse', () => false, QUIESCENCE_MS)).toBe(false) }) it('covers adopted panes that carry no launch metadata', () => { - expect(hasQuietMuseReadyPrompt(record(), null, () => true, QUIESCENCE_MS)).toBe(true) - expect(hasQuietMuseReadyPrompt(record(), undefined, () => true, QUIESCENCE_MS)).toBe(true) + expect(hasQuietReadyScreen(record(), null, () => true, QUIESCENCE_MS)).toBe(true) + expect(hasQuietReadyScreen(record(), undefined, () => true, QUIESCENCE_MS)).toBe(true) }) - it('refuses another agent quoting Muse in its scrollback', () => { - expect(hasQuietMuseReadyPrompt(record(), 'codex', () => true, QUIESCENCE_MS)).toBe(false) + it('covers Codex, whose title carries no rest signal once idle', () => { + expect(hasQuietReadyScreen(record(), 'codex', () => true, QUIESCENCE_MS)).toBe(true) + }) + + it('refuses another agent quoting Muse or Codex in its scrollback', () => { + expect(hasQuietReadyScreen(record(), 'claude', () => true, QUIESCENCE_MS)).toBe(false) }) }) @@ -87,7 +86,7 @@ describe('evaluateTuiIdle muse lane', () => { }) describe('evaluateTuiIdle ranking', () => { - const noMuse = { readMuseReadyBodyEvidence: () => false } + const noMuse = { readQuietReadyBodyEvidence: () => false } it('ranks a blocking prompt in the tail above an explicit idle title', () => { const verdict = evaluateTuiIdle( @@ -201,13 +200,14 @@ describe('rest signal agrees with the lanes that can settle a wait', () => { screenRead = true return null }) - const museBody = hasQuietMuseReadyPrompt(record(), agent, () => true, QUIESCENCE_MS) - if (museBody) { - expect(signal).toBe('ready-body') + const quietScreenBody = hasQuietReadyScreen(record(), agent, () => true, QUIESCENCE_MS) + // Why not only ready-body: Codex keeps its stronger hook-driven title beside this lane. + if (quietScreenBody) { + expect(signal).not.toBe('none') } // Why a screen read also counts: Qoder's ready body is its composer, read by identity. if (signal === 'ready-body') { - expect(museBody || screenRead).toBe(true) + expect(quietScreenBody || screenRead).toBe(true) } if (signal !== 'none') { return @@ -241,7 +241,7 @@ describe('a DSH pane settles tui-idle on its own hook', () => { record: { lastAgentStatus: null, lastOutputAt: null, lastOscTitle: '\u2726 \u{1F40B} repo' }, rendererTitle: undefined, readPositiveBodyEvidence: () => false, - readMuseReadyBodyEvidence: () => false, + readQuietReadyBodyEvidence: () => false, readTailBlockedReason: () => null, agent: 'dsh' as const, firstPartyStatus: { state: 'done' as const, updatedAt: Date.now() }, diff --git a/src/main/runtime/tui-idle-evidence.ts b/src/main/runtime/tui-idle-evidence.ts index c9cd6675d38..cb7dc13714b 100644 --- a/src/main/runtime/tui-idle-evidence.ts +++ b/src/main/runtime/tui-idle-evidence.ts @@ -14,7 +14,7 @@ import { detectExplicitIdleStatusFromTitle, detectTerminalWaitBlockedReason, isKnownReadyPromptBody, - isMuseReadyPromptPreview + isQuietReadyScreenBody } from './terminal-wait-detection' /** @@ -29,8 +29,8 @@ import { * 0. BLOCKED — the tail shows a prompt waiting on the user. * 1. STRONG READY — the agent states it is ready: an explicit idle marker in its own * title, or a known ready-prompt body. - * 1b. MUSE — Muse emits no title signal at all, so its ready-screen body stands in - * for the strong evidence, believed only once the stream has gone quiet. + * 1b. QUIET READY SCREEN — Muse and an idle Codex title no rest signal, so their + * ready-screen body stands in for the strong evidence, believed only once quiet. * 2. WORKING — a fresh first-party agent status (OSC 9999) saying working/blocked/ * waiting, or a working title. The agent's own account of itself outranks anything * inferred. @@ -187,8 +187,8 @@ export type TuiIdleEvaluationInput = { * (~11us and a multi-KB string on a full tail); the title check below usually answers * first, and then none of that has to happen at all. */ readPositiveBodyEvidence: () => boolean - /** Tier 1b body evidence: a Muse ready screen. Thunk for the same reason as above. */ - readMuseReadyBodyEvidence: () => boolean + /** Tier 1b body evidence: a Muse or Codex ready screen. Thunk for the same reason as above. */ + readQuietReadyBodyEvidence: () => boolean agent: TuiAgent | null | undefined firstPartyStatus: FirstPartyAgentStatus quiescenceMs: number @@ -207,34 +207,34 @@ const READY_STRONG: TuiIdleVerdict = { kind: 'ready-strong' } const READY_WEAK: TuiIdleVerdict = { kind: 'ready-weak' } const WORKING: TuiIdleVerdict = { kind: 'working' } +const QUIET_READY_SCREEN_AGENTS: ReadonlySet = new Set(['muse', 'codex']) + /** - * Tier 1b: a Muse ready screen in the body, believed only once the stream has gone quiet. + * Tier 1b: a ready screen in the body, believed only once the stream has gone quiet. * - * Muse is the one agent with no title signal at all — its OSC title is the bare cwd and - * never changes — so neither the explicit-idle nor the sustained-title lane can fire. - * The ready screen proves the TUI is up; the quiescence demand keeps a mid-turn - * streaming pane from satisfying, mirroring the codex tier-3 lane's - * positive-evidence-plus-quiet shape. Scoped to Muse and agent-unknown panes: another - * agent's scrollback quoting Muse must not settle its wait. + * Muse's OSC title is the bare cwd and never changes, and an idle Codex titles its pane with + * the cwd (plus a thread name) and no agent name, so neither the explicit-idle nor the + * sustained-title lane can fire. The ready screen proves the TUI is up; the quiescence + * demand keeps a mid-turn streaming pane from satisfying, mirroring the tier-3 lane's + * positive-evidence-plus-quiet shape. Scoped to those agents and agent-unknown panes (which + * read only Muse's screen): another agent's scrollback quoting them must not settle its wait. */ -export function hasQuietMuseReadyPrompt( +export function hasQuietReadyScreen( record: TuiIdleEvidenceRecord, agent: TuiAgent | null | undefined, readBodyEvidence: () => boolean, quiescenceMs: number ): boolean { - if (agent !== null && agent !== undefined && agent !== 'muse') { - return false - } - if (!readBodyEvidence()) { + if (agent && !QUIET_READY_SCREEN_AGENTS.has(agent)) { return false } // Why: same rule as the tier-3 lane — without an output clock there is no // corroboration available, so hold out instead of settling. - if (record.lastOutputAt === null) { + if (record.lastOutputAt === null || Date.now() - record.lastOutputAt < quiescenceMs) { return false } - return Date.now() - record.lastOutputAt >= quiescenceMs + // Why last: a streaming pane never pays for the screen projection. + return readBodyEvidence() } /** The one place the tiers are combined; every settle site branches only on the verdict. */ @@ -273,11 +273,13 @@ export function evaluateTuiIdle(input: TuiIdleEvaluationInput): TuiIdleVerdict { : { kind: 'pending', quietForeground: 'closed' } } // Why after the veto: a first-party working account outranks inferred body evidence. + // Why before the working title: Codex can leave a stale spinner title after a turn, and a + // live spinner emits output every ~100 ms, so a spinning pane is never quiet here. if ( - hasQuietMuseReadyPrompt( + hasQuietReadyScreen( input.record, input.agent, - input.readMuseReadyBodyEvidence, + input.readQuietReadyBodyEvidence, input.quiescenceMs ) ) { @@ -328,7 +330,8 @@ export function leafTuiIdleEvidence( rendererTitle: leaf.paneTitle ?? source.getTabTitle(leaf.tabId), readPositiveBodyEvidence: () => isKnownReadyPromptBody(waitText(), agent, () => source.readScreenLines(leaf.ptyId)), - readMuseReadyBodyEvidence: () => isMuseReadyPromptPreview(waitText()), + readQuietReadyBodyEvidence: () => + isQuietReadyScreenBody(waitText(), agent, () => source.readScreenLines(leaf.ptyId)), agent, firstPartyStatus: source.getFirstPartyAgentStatus(leaf.ptyId), quiescenceMs: source.quiescenceMs @@ -348,7 +351,8 @@ export function ptyTuiIdleEvidence( readPositiveBodyEvidence: () => (agent !== 'qoder' && source.getAdoptedPtyIdleStatus(pty) === 'idle') || isKnownReadyPromptBody(waitText(), agent, () => source.readScreenLines(pty.ptyId)), - readMuseReadyBodyEvidence: () => isMuseReadyPromptPreview(waitText()), + readQuietReadyBodyEvidence: () => + isQuietReadyScreenBody(waitText(), agent, () => source.readScreenLines(pty.ptyId)), agent, firstPartyStatus: source.getFirstPartyAgentStatus(pty.ptyId), quiescenceMs: source.quiescenceMs