Feature: Background subagents should be able to escalate permission requests to the parent session
Problem
When a background subagent (dispatched via Agent tool with run_in_background: true) encounters a tool call that isn't pre-approved in settings.json, it silently auto-denies. The subagent fails without any way to request the missing permission from the user.
This makes background subagents fragile — if you miss even one permission in your pre-approved list, the subagent silently fails and loses all its work.
Current Behavior
- Parent dispatches background subagent
- Subagent needs
Bash(docker compose up)which isn't pre-approved - Tool call is auto-denied silently
- Subagent fails or produces incomplete output
- User has no idea a permission was needed until they read the error
Desired Behavior
- Parent dispatches background subagent
- Subagent needs
Bash(docker compose up)which isn't pre-approved - Subagent pauses and raises a permission request to the parent session
- Parent session shows the user:
````
Background agent "build-service" needs permission:
Bash: docker compose up
[Approve once] [Approve for session] [Deny]
- User approves → permission injected → subagent resumes
- User denies → subagent informed, can handle gracefully
Use Case
Any orchestration pattern that dispatches multiple background subagents in parallel. Pre-approving every possible permission upfront works for 90% of cases, but the remaining 10% — where an agent discovers it needs something unexpected at runtime — currently causes silent failures.
Related Issues
- #23983 — PermissionRequest hooks not triggered for subagent requests (prerequisite)
- #27203 — canUseTool callback not invoked for background subagent tool calls (prerequisite)
- #32402 — Background subagents silently auto-deny permissions (this is the symptom)
Both #23983 and #27203 are prerequisites for this — hooks and callbacks need to fire before escalation can work. But even with those fixed, there's no mechanism for a background subagent to pause execution and wait for a permission decision from the parent.
Suggested Approach
- Background subagent enters a "waiting for permission" state instead of auto-denying
- Parent session is notified (similar to how task completion notifications work)
- User approves/denies via the parent session
- Subagent resumes or handles denial gracefully
- Approved permissions accumulate for the rest of the session (don't ask twice)
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗