Repository navigation
Description
What problem are you trying to solve?
When Codex uses delegated sub-agents, a child agent can hit a sandbox escalation prompt, for example while running a safe verification command such as uv run .... In the main agent loop, the auto-approval mechanism can classify and approve safe recurring commands with narrow prefix rules, so the workflow remains autonomous.
For sub-agents, the same kind of escalation can block indefinitely because the parent agent does not appear to receive an actionable approval event, and the user is not necessarily watching the child thread. This makes review/exploration sub-agents less reliable, especially for long-running code review gates.
Desired behavior
Sub-agent escalation requests should be handled by the same approval policy available to the parent agent, or routed through the parent agent as an approval broker.
A useful behavior would be:
- Child agent requests escalation for a command.
- The request is evaluated by the inherited auto-approval classifier and existing approved prefix rules.
- If approved, the sub-agent continues without user intervention.
- If denied or ambiguous, the request is surfaced to the parent/main thread with the exact command, justification, and suggested prefix rule.
- The child should not silently block in a place where neither the parent nor the user can keep the task moving.
Why this matters
Delegated review agents are most valuable when they can run in parallel and stay autonomous. Today, a parent agent can preflight common commands, but it cannot predict every verification command a sub-agent may discover while reviewing. When that happens, the sub-agent may stall instead of returning useful partial findings.
This pushes users toward brittle prompting rules like "sub-agents must never request escalation," which avoids deadlocks but also reduces verification quality.
Possible implementation
Consider one of these models:
- Inherit the parent thread's auto-approval policy and approved prefix rules into child agents.
- Route child escalation requests to the parent agent loop for classification.
- Add a sub-agent setting such as
approval_policy = inherit | parent_brokered | never.
The key requirement is that sub-agent escalation should not create an unobserved blocking approval prompt.
Environment
Codex App with delegated sub-agents and sandboxed command execution.
Activity
github-actions commentedon May 18, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
1Ghasthunter1 commentedon Jul 9, 2026
Plz
ShadowTheFrog commentedon Aug 22, 2026
Adding a Windows Codex Desktop reproduction that shows why parent-brokered escalation matters for terminal callback workflows.
Environment
codex-cli 0.147.0Reproduction shape
Permission deniedon the workspace-local journal write.This is not a pure parent-wake reproduction of #15723 because the send was never reached. It is an example of this issue's core problem: a subagent's missing/inapplicable write authority or escalation path can silently strand an autonomous parent workflow.
Expected
A subagent should not fail or wait invisibly while the parent has no event that can resume the workflow.
Current workaround
We are adding an explicit launch preflight that proves the child can write the exact callback store (or can request controlled escalation) before the parent enters passive wait. This reduces the symptom but does not replace a runtime-level inherited or parent-brokered approval path.
NaturalMatchaKing commentedon Oct 6, 2026
Strong +1 for the parent-brokered option. Both the user and a coordinating assistant would value an opt-in way to delegate bounded approval decisions: the assistant could approve or deny routine child-task escalations within an explicit, revocable user-defined scope, instead of the user clicking every prompt. The request and decision should be visible in an audit trail. Out-of-scope actions and mandatory human security confirmations would still go to the user.
It would also help to expose structured pending-approval status to the coordinating assistant: which thread is requesting approval, the proposed action, and whether execution is blocked. Clear approval lifecycle notifications would let the assistant identify the right task and promptly tell the user what is needed, even when approval must remain human-only.
Related visibility request: make project-associated threads that run with a connected computer visible in Codex web as well, including their execution state and pending approvals. This would help the coordinating assistant and user follow the same task across desktop and web.
zhangheyong commentedon Oct 16, 2026
Adding a related user experience from ChatGPT dot on 2026-10-16 (main conversation on mobile, delegated work on a connected Mac). I cannot confirm that this has the same underlying cause as the original Codex sub-agent issue.
I delegate a task and explicitly approve a bounded action in the main conversation. The assistant passes that approval to a desktop task, but the task can still reject the forwarded authorization. I then have to locate the child conversation and repeat the instruction or approval. In some cases there is only a denial, with no actionable approval request that the main assistant can surface. This makes the user coordinate the agents instead of the assistant coordinating them.
Requested improvement:
This is not a request to bypass safety checks or grant blanket access. The goal is to preserve meaningful, action-specific confirmation while removing repeated authorization and conversation switching. A related dot report appears in #45167.