Workflow subagents don't inherit project settings.local.json permission allow-rules (prompt per tool call)

Status Open
Maintainer reply None cached
Activity 5 comments · opened Jul 2, 2026

Summary

When running a multi-agent Workflow (e.g. the bundled deep-research skill/workflow), the subagents it spawns do not inherit the permissions.allow rules from the project's .claude/settings.local.json. Tools that are explicitly allowlisted for the session — WebSearch, WebFetch, Agent — still trigger an individual permission prompt on every call made by a workflow subagent. A single deep-research run fanned out to ~100 independent WebSearch/WebFetch calls, each requiring manual approval, despite those tools being allowlisted.

Expected behavior

Workflow subagents should inherit the same permission allow/deny rules as the main session (user + project + local settings). Allowlisted read-only tools (WebSearch, WebFetch) should not prompt when invoked from within a workflow subagent.

Actual behavior

Every subagent tool call prompts for approval, even though the tool is present in permissions.allow. Invoking the same tools directly from the main session does not prompt — confirming the allow-rule resolves correctly at the session level but is not propagated to workflow subagents.

Reproduction

  1. Project .claude/settings.local.json contains (default permission mode, no bypass):

``json
{ "permissions": { "allow": ["WebSearch", "WebFetch", "Agent", "MCP"] } }
``

  1. Launch a multi-agent workflow that fans WebSearch/WebFetch across subagents — e.g. run the bundled deep-research workflow: Workflow({ name: "deep-research", args: "<question>" }).
  2. Observe: a separate permission prompt appears for each subagent WebSearch/WebFetch call (~100 for one run).
  3. Contrast: invoking WebSearch/WebFetch directly in the main session produces no prompt.

Impact

Under the default permission mode, multi-agent workflows (deep-research, and any custom Workflow that fans out tool calls) are impractical — the user must hand-approve ~100 independent items, which defeats the purpose of background fan-out and effectively forces a bypass/dontAsk permission mode to use the feature at all.

Environment

  • Claude Code — model claude-opus-4-8
  • macOS (Darwin 25.5.0)
  • Permission rules defined in project .claude/settings.local.json; permissions.allow includes WebSearch, WebFetch, Agent, MCP
  • Default permission mode (no permissions.defaultMode override)

Likely cause / suggestion

The permission-resolution context for workflow/subagent tool calls appears not to merge project-local (and possibly user-level) permissions.allow rules. Propagating the resolved session permission rules to spawned workflow subagents — or at minimum honoring allowlisted read-only tools such as WebSearch/WebFetch — would resolve this.

View original on GitHub ↗

5 Comments

rpelevin · 1 month ago

This looks like a permission-context propagation bug rather than only a prompt-volume problem.

If a workflow subagent is spawned inside a session where WebSearch, WebFetch, Agent, or MCP is already allowed by the resolved project policy, the child run should inherit a bounded permission snapshot. But that snapshot should stay explicit and scoped, not become ambient authority.

The failure mode cuts both ways:

  • no inheritance: every child read-only call prompts, which pushes users toward broad bypass modes just to make workflows usable
  • unbounded inheritance: a child agent may silently gain more authority than the parent intended

A safe contract could bind the inherited permission snapshot to:

  • parent session id
  • workflow id
  • child agent id
  • project root or settings digest
  • tool name and operation family
  • allow or deny decision source
  • expiry or child-run scope
  • whether the permission came from user, project, local, or session state

Tests I would add:

  • direct WebSearch allowed by project policy does not prompt
  • subagent WebSearch in the same workflow inherits the same allow decision and does not prompt
  • deny rules override inherited allow rules
  • a subagent cannot expand from WebSearch/WebFetch into Agent or MCP unless those are explicitly allowed
  • settings digest change during a workflow forces recompute or prompt
  • inherited permission is visible in the run record so the user can audit why no prompt appeared

That keeps deep-research-style workflows usable without making permission inheritance invisible or broader than the parent session approved.

Boundary: architecture and conformance feedback only; no claim about Anthropic/Claude Code alignment, implementation correctness, acceptance, partnership, integration, customer interest, official alignment, Claude Code usage, or Neura usage.

lpieprzyk · 1 month ago

I ran into the same problem, but only in Plan Mode.

I ran a controlled A/B test that isolates this specifically to Plan Mode, separate from the general allow-list-inheritance question this issue tracks.

Setup: Project-level .claude/settings.json and .claude/settings.local.json both allow-list mcp__intellij__find_files_by_name_keyword. I additionally synced the same rule to user-level ~/.claude/settings.json to rule out a settings-scope gap. Then I ran the identical tool call (mcp__intellij__find_files_by_name_keyword) via the identical subagent type (Explore, built-in), toggling only whether the main session was in Plan Mode.

Results (replicated):

| Run | Main session mode | Tool call (via Explore subagent) | Permission prompt shown? |
|---|---|---|---|
| 1 | Plan Mode | find_files_by_name_keyword | Yes |
| 2 | Manual/default | find_files_by_name_keyword | No |
| 3 | Plan Mode | find_files_by_name_keyword | Yes |
| 4 | Manual/default | find_files_by_name_keyword | No |
| 5 | Plan Mode | find_files_by_name_keyword | Yes |

3/3 in Plan Mode → prompted. 2/2 outside Plan Mode → not prompted. Tool, subagent type, and allow-list state were held constant across all runs — only the main session's mode changed.

This contradicts the permission-modes docs, which state: "Permission prompts still apply as they do in Manual mode" for Plan Mode. In practice, subagent-originated MCP tool calls made while the parent session is in Plan Mode appear to force a permission prompt regardless of permissions.allow entries at either project or user scope. Outside Plan Mode, the same allow-listed tool call from the same subagent type does not prompt.

Environment:

  • Claude Code CLI version: 2.1.200
  • OS: Windows 11
  • Shell: Git Bash (also reproduces with the IDE-integrated PowerShell terminal)
  • Model: Claude Opus 4.8
  • MCP servers involved: intellij (JetBrains IntelliJ MCP plugin, registered at user scope via claude mcp add -s user) — the prompt was against the user-scope intellij server, so this isn't specific to project-scope .mcp.json trust gating.
  • Subagent type: built-in Explore (not a custom .claude/agents/ definition, so agent-level permissionMode frontmatter doesn't apply here)
cblecker · 1 month ago

@lpieprzyk Just adding that I can reproduce the same findings. Thanks for sharing them, as moving out of plan mode can work around this in some circumstances (at least until this gets hopefully fixed).

LukeSal88 · 1 month ago

Still reproducing on 2.1.204 (macOS 26.6, Opus 4.8).

MCP tools that are allow-listed at both project (.claude/settings.json) and
user (~/.claude/settings.json) scope still trigger an approval prompt on
subagent-originated calls. In my case the affected servers are brave-search
(mcp__brave-search__*) and context-mode
(mcp__plugin_context-mode_context-mode__ctx_execute) — so this isn't specific
to the intellij server in @lpieprzyk's repro, and nothing in the 2.1.201–2.1.204
changelogs addresses it.

I haven't re-run @lpieprzyk's controlled Plan-Mode A/B on 2.1.204, so I can't
independently confirm the Plan-Mode correlation at this version; flagging only
that the core symptom (allow-listed MCP tools prompting from subagents) persists
on the latest release.

kcarriedo · 1 month ago

This one is particularly rough for deep-research or any workflow that fans out to many read-only tool calls, because the workaround -- approve each call manually -- is not just annoying, it serializes what should be parallel work. Clicking through 100 WebSearch prompts defeats the point of running a workflow.

The permissions model here should treat subagents as executing within the session that spawned them. If WebSearch is allowlisted in .claude/settings.local.json for the project, a subagent running that workflow in the same project context is not a different security principal -- it is the same user's work.

A few edge cases worth calling out if this gets prioritized:

  1. The inheritance should be scoped to read-only/non-destructive tools by default (WebSearch, WebFetch, Read). Write-capable tools (Bash, Edit, Write) arguably deserve a conscious allowlist even in subagents.
  1. settings.local.json vs. settings.json distinction matters: local settings are per-machine and not committed, which is exactly where users put aggressive allow-rules. Subagents should respect both layers, with local taking precedence as it does in the main session.
  1. This also blocks running workflows in CI/CD contexts where there is no human present to approve prompts. A workflow that cannot run non-interactively because subagents keep pausing for approval is not useful for automation.

Worth linking to #70591 (centralized approval notifications) -- these two issues describe opposite sides of the same gap: one needs subagents to not prompt when already allowlisted, the other needs a way to batch-approve when prompting is appropriate.