Subagents don't inherit parent session permission allow list
Description
Subagents spawned via the Task tool don't inherit the parent session's permission allow list from settings.json. This means agents get prompted for Read, Edit, Glob, Grep, etc. even when the user has broad patterns like Read(/**) or Edit(/Users/me/**) configured in their global settings.
Steps to reproduce
- Configure
~/.claude/settings.jsonwith:
``json``
{
"permissions": {
"allow": [
"Read(/**)",
"Edit(/Users/me/**)",
"Glob(**)",
"Grep(**)"
]
}
}
- In the main session,
Read,Edit,Glob,Grepall auto-approve as expected - Spawn a subagent via the Task tool (e.g., an Explore agent to search the codebase)
- The subagent gets prompted for every
Read,Glob, andGrepcall, despite the samesettings.jsonbeing in effect
Expected behavior
Subagents should respect the same permissions.allow list from settings.json as the parent session. The settings are user-level and global — there's no reason for agents to have a different permission context.
Actual behavior
Subagents appear to start with a blank permission context. Every tool call that requires permission triggers a user prompt, even when the parent session would auto-approve.
Impact
This makes subagents significantly less useful for autonomous work. An Explore agent that needs to read 20 files will prompt 20 times, defeating the purpose of delegation.
Workaround
A PreToolUse hook that reads the allow patterns from settings.json and auto-approves matching tool calls:
{
"hooks": {
"PreToolUse": [
{
"matcher": "Read|Edit|Write|Glob|Grep|LS|NotebookRead|NotebookEdit",
"hooks": [
{
"type": "command",
"command": "~/.claude/hooks/tool-permissions-inherit.sh",
"timeout": 5
}
]
}
]
}
}
Full hook implementation: https://github.com/robtaylor/claude-config/blob/main/hooks/tool-permissions-inherit.sh
Related: #29967 (permission pattern matching issues with piped Bash commands)
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗