mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-20 09:09:35 +02:00
Codex is the one CLI Codeman launches with its approvals on by default, and it declares `hooks: 'none'`, so nothing tells Codeman it stopped to ask. A codex session parked on "Would you like to run the following command?" read as plainly idle, and one parked on a question read as WORKING, because the question's own key hints end in `esc to interrupt`, codex's working line. This adds a generic, optional registry field, `capabilities.workDetect.blockedLine` (plus `blockedLines`, the window), and the session state that reads it: - `isBlockedScreen()` (session-activity.ts, pure) joins the last `blockedLines` non-blank rows of a capture and tests the pattern once, so a pattern can demand several markers and anchor the dialog's footer on the end of the window. - `Session` reads it off the same capture the idle confirmation already takes, emits `blockedChanged`, and exposes `screenBlocked`. It raises on one reading, and while a dialog is up re-reads the screen every 2 s, because answering resumes the turn and a busy pane would not reach the settle path again until the turn ended. It clears only after two readable captures in a row without the dialog, so a capture taken mid-repaint cannot clear and re-raise it; an unreadable capture changes nothing. A blocked screen wins over the working line in the same capture. - The pattern goes through `compileVersionRegex()` in both the schema refine and at use (lazily cached), like every other config regex. Codex's pattern was measured on a live codex-cli 0.162.0 pane on 2026-10-14 (`-a on-request -s read-only`, widths 200 down to 36): it needs a `› N.` option row and then the dialog's key-hint row as the last row, allowing for that row to wrap below about 60 columns. Command, edit and network-escalation approvals, single and multi-question dialogs and the startup trust prompt match; the idle and working views, menus the user opened (`/model`, `/permissions`, `/review`), the composer holding the dialogs' words and a transcript quoting them verbatim do not. `Implement this plan?` is left out on purpose: its footer is the same as `/model`'s and the turn has ended there. The captures are kept as fixtures (trailing whitespace trimmed, the scratch path replaced). Nothing consumes `blockedChanged` yet; the next commit raises the alert. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
51 lines
1.3 KiB
Plaintext
51 lines
1.3 KiB
Plaintext
╭─────────────────────────────────────────────────╮
|
||
│ ✨ Update available! 0.162.0 -> 0.162.1 │
|
||
│ Run npm install -g @openai/codex to update. │
|
||
│ │
|
||
│ See full release notes: │
|
||
│ https://github.com/openai/codex/releases/latest │
|
||
╰─────────────────────────────────────────────────╯
|
||
|
||
|
||
>_ OpenAI Codex (v0.162.0)
|
||
/tmp/codex-scratch/repo
|
||
|
||
|
||
› Run the shell command: touch created.txt (it needs write access, ask me for approval to run it outside the sandbox)
|
||
|
||
|
||
• touch created.txt needs write access in the workspace. I’ll request approval to run that exact command outside the read only sandbox.
|
||
|
||
• Running touch created.txt
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
Would you like to run the following command?
|
||
|
||
Environment: local
|
||
|
||
Reason: May I run `touch created.txt` outside the read only sandbox to create the requested file?
|
||
|
||
$ touch created.txt
|
||
|
||
|
||
› 1. Yes, proceed (y)
|
||
2. Yes, and don't ask again for commands that start with `touch created.txt` (p)
|
||
3. No, and tell Codex what to do differently (esc)
|
||
|
||
Press enter to confirm or esc to cancel
|