Skip to content

feat(agents): Codex asks the owner before it acts (A3b of spec 30) - #250

Merged
httpsphl merged 1 commit into
mainfrom
feat/codex-approvals
Oct 10, 2026
Merged

httpsphl merged 1 commit into
mainfrom
feat/codex-approvals

Conversation

@httpsphl

Copy link
Copy Markdown
Owner

Second slice of Codex bots (#249): the bot is no longer limited to reading.

Asking. The thread runs with approvalPolicy: on-request (never for a bot in plan mode) in the read-only sandbox. A command that needs more than reading, or a file change, arrives from codex app-server as a request. It becomes the usual approval card (Bash with the command, Write/Edit with the path from the item's item/started), goes through the bot's 'allow always' rules and its mode (bypass_permissions allows; accept_edits allows edits and still asks for commands), and the answer goes back as accept/decline. The tool of a non-Botloft MCP server asks too; Botloft's own tools do not.

Fences. A request whose path or command names a folder Botloft fences (spec 7.5; slashes and case aside) is declined without making a card.

Plumbing. approvals::agent_request (rules, then the owner) is the shared entry for an agent that asks in its own protocol; OutputDecoder::handle takes &Arc<Daemon> so the wait runs in a task while the output goes on; the decoder moved to codex_decoder.rs. The dialog's warning and the README say what is true now.

Real Codex 0.148.0-alpha.9, dev daemon. A command that writes a file arrived as a Bash card, the bot went to needs_approval; allowed, the file was created and the bot said so; denied, nothing was created and the bot reported the denial.

Not covered (spec 30.3.2). Reading is not fenced: a read-only command runs without asking, so a fenced folder can be read by a command. No model picker or images yet (A3c).

Tests: codex_bot.rs (change allowed/denied by the owner, command card and crew tools, fenced folders, mode), a unit test for the fence match; fmt, clippy -D warnings, cargo test --workspace and pnpm check pass.

approvalPolicy on-request (never in plan mode): a command or a file change
the sandbox does not allow reaches the chat as the usual approval card, with
the bot's 'allow always' rules and its mode (bypass, accept edits). A request
that names a fenced folder is refused without asking. The decoder moves to
codex_decoder.rs and gets the shared daemon to wait for the owner in a task.
Checked with the real codex: allowed, the file was made; denied, it was not.
@httpsphl
httpsphl merged commit 62c9467 into main Oct 10, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant