mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-15 18:59:33 +01: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>
50 lines
1.4 KiB
Plaintext
50 lines
1.4 KiB
Plaintext
› Edit calc.py to add a function sub(a, b) that returns a - b. Use your file editing tool, not a shell command.
|
||
|
||
• Explored
|
||
└ Read calc.py
|
||
+ Show details
|
||
|
||
• Edited calc.py (+4 -0)
|
||
3 +
|
||
4 +
|
||
5 +def sub(a, b):
|
||
+ Show details
|
||
|
||
■ Conversation interrupted - use /feedback if something went wrong
|
||
|
||
✘ Failed to apply patch
|
||
└ (error details unavailable)
|
||
+ Show details
|
||
|
||
|
||
› Use curl to fetch https://example.com and tell me the HTTP status code.
|
||
|
||
|
||
• I’ll use curl to fetch the URL and report the response status.
|
||
|
||
• Failed (exit 6) curl -sS -o /dev/null -w '%{http_code}' https://example.com
|
||
└ curl: (6) Could not resolve host: example.com
|
||
000
|
||
|
||
• curl couldn’t resolve example.com in the sandbox, so it returned status 000. I need network access to fetch it.
|
||
|
||
Worked for 3s • 4:24 AM
|
||
|
||
|
||
› Request approval to rerun that curl with network access (escalated permissions).
|
||
|
||
|
||
• I’ll request approval to rerun the same curl command with network access.
|
||
|
||
✗ You canceled the request to run curl -sS -o /dev/null -w '%{http_code}' https://example.com
|
||
|
||
• Failed (exit 1) curl -sS -o /dev/null -w '%{http_code}' https://example.com
|
||
└ (no output)
|
||
|
||
■ Conversation interrupted - use /feedback if something went wrong
|
||
› /plan switch to Plan mode
|
||
|
||
› /plan
|
||
|
||
GPT-6-Luna default · /tmp/codex-scratch/repo · Request approval to create file
|