Skip to content

bypassPermissions does not bypass Read/Bash for paths outside project root in background subagents #29610

@churnish

Description

@churnish

Description

A custom subagent with permissionMode: bypassPermissions in its frontmatter is denied Read and Bash access to files outside the project root (specifically ~/.claude/plans/). Both tools are listed in the subagent's tools field.

The subagent runs as a background agent (background: true). The permission denial is silent — the subagent sees both tool calls denied and asks for permission, but background agents auto-deny unresolved prompts, so the subagent fails.

Subagent config

---
name: code-modifier
tools: Read, Glob, Grep, Edit, Write, Bash
permissionMode: bypassPermissions
maxTurns: 250
background: true
skills:
  - build
---

Location: ~/.claude/agents/code-modifier.md

Steps to reproduce

  1. Create a subagent with the config above
  2. In the parent conversation, dispatch the subagent with a prompt that references a file at ~/.claude/plans/some-plan.md
  3. The subagent attempts Read on that path → denied
  4. The subagent attempts Bash with cat on that path → denied
  5. The subagent asks for permission but as a background agent, the prompt auto-denies

Expected behavior

permissionMode: bypassPermissions should skip all permission checks per the docs: "Skip all permission checks."

Actual behavior

Both Read and Bash are denied for paths outside the project root (~/.claude/plans/ in this case), despite bypassPermissions.

Evidence

Subagent transcript (abbreviated):

ASSISTANT: Let me start by reading the plan file.
TOOL CALL: Read {"file_path": "/Users/.../plans/selectstart-selection-guard.md"}
TOOL CALL: Bash {"command": "cat ~/.claude/plans/selectstart-selection-guard.md"}
ASSISTANT: I need permission to read the plan file. Both the Read tool and Bash tool were denied.

Environment

  • Claude Code version: latest (Feb 2026)
  • macOS (Darwin 25.3.0)
  • Subagent scope: user-level (~/.claude/agents/)

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions