You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature]: An unattended read-only mode for delegate_task Codex children (approvalPolicy: never + sandboxPolicy: readOnly) #15381
On 0.0.46-nightly.20261003.2638, a V2 thread can delegate to a Codex child in one of four runtime modes. None of them gives a child that is both read-only and able to finish unattended:
approval-required sends Codex approvalPolicy: untrusted, approvalsReviewer: user and sandboxPolicy: readOnly. With codex-cli 0.160, untrusted asks for approval before every shell command, including cat and pwd. The child then waits on a hidden approval indefinitely (the notification gap is [Bug]: A delegated task that asks a question or needs approval never tells its parent (V2) #15082). In our runs, a one-command cat child stayed running with no new items for over three minutes until cancelled; a child that runs no commands completed in seconds.
auto and auto-accept-edits send sandboxPolicy: workspaceWrite, so the child can write inside the workspace. A test write by a child told to stay read-only succeeded with no approval asked.
full-access sends dangerFullAccess.
So a read-only role, such as a code reviewer that must not change what it reviews, has no unattended native route. Codex's own exec -s read-only (approval never) gives exactly that behaviour: commands run inside the read-only sandbox, writes fail with operation not permitted, and the run completes.
Steps to reproduce
From a V2 thread, call delegate_task with mode: "async", a Codex model, runtimeMode: "approval-required" and a task that runs one read-only command, for example pwd.
A delegation option that runs the child unattended under an enforced read-only sandbox: approvalPolicy: never with sandboxPolicy: readOnly for Codex children. The Codex adapter already applies runtimePolicy.approvalPolicy and runtimePolicy.sandboxPolicy overrides when present (buildCodexTurnStartParams); delegate_task does not expose them. A new runtime mode (for example read-only) or explicit approvalPolicy/sandboxPolicy fields on delegate_task would both work, as long as an orchestrator can see the child's effective sandbox afterwards.
For a Claude child, the matching question is whether interactionMode: "plan" blocks writes in the harness or relies on the model; we could not observe a harness denial because the model declined to attempt the write.
What happens
On
0.0.46-nightly.20261003.2638, a V2 thread can delegate to a Codex child in one of four runtime modes. None of them gives a child that is both read-only and able to finish unattended:approval-requiredsends CodexapprovalPolicy: untrusted,approvalsReviewer: userandsandboxPolicy: readOnly. With codex-cli 0.160,untrustedasks for approval before every shell command, includingcatandpwd. The child then waits on a hidden approval indefinitely (the notification gap is [Bug]: A delegated task that asks a question or needs approval never tells its parent (V2) #15082). In our runs, a one-commandcatchild stayedrunningwith no new items for over three minutes until cancelled; a child that runs no commands completed in seconds.autoandauto-accept-editssendsandboxPolicy: workspaceWrite, so the child can write inside the workspace. A test write by a child told to stay read-only succeeded with no approval asked.full-accesssendsdangerFullAccess.So a read-only role, such as a code reviewer that must not change what it reviews, has no unattended native route. Codex's own
exec -s read-only(approvalnever) gives exactly that behaviour: commands run inside the read-only sandbox, writes fail withoperation not permitted, and the run completes.Steps to reproduce
delegate_taskwithmode: "async", a Codex model,runtimeMode: "approval-required"and a task that runs one read-only command, for examplepwd.runningand never completes;task_statusshowsworking. Nothing surfaces to the parent or the user ([Bug]: A delegated task that asks a question or needs approval never tells its parent (V2) #15082).Request
A delegation option that runs the child unattended under an enforced read-only sandbox:
approvalPolicy: neverwithsandboxPolicy: readOnlyfor Codex children. The Codex adapter already appliesruntimePolicy.approvalPolicyandruntimePolicy.sandboxPolicyoverrides when present (buildCodexTurnStartParams);delegate_taskdoes not expose them. A new runtime mode (for exampleread-only) or explicitapprovalPolicy/sandboxPolicyfields ondelegate_taskwould both work, as long as an orchestrator can see the child's effective sandbox afterwards.For a Claude child, the matching question is whether
interactionMode: "plan"blocks writes in the harness or relies on the model; we could not observe a harness denial because the model declined to attempt the write.Related