Background agents don't inherit Write/Edit tool allow rules from project settings

Resolved 💬 5 comments Opened Mar 30, 2026 by VBaratham Closed May 2, 2026

Description

Background agents (launched with run_in_background: true) auto-deny Write and Edit tool calls even when matching allow rules exist in the project .claude/settings.json.

Reproduction

  1. Create a project .claude/settings.json with:
{
  "permissions": {
    "allow": [
      "Write(path:/path/to/project/data/**)",
      "Bash(python3:*)"
    ]
  }
}
  1. Launch a background agent that tries to write a file to the allowed path using the Write tool → denied
  1. Launch a background agent that writes the same file using Bash with python3 -c "open('path', 'w').write('test')"succeeds

Expected behavior

Both Write tool and Bash tool allow rules should propagate to background agents equally. If Bash(python3:*) works, Write(path:...) should too.

Actual behavior

  • Bash allow rules propagate correctly to background agents
  • Write and Edit allow rules do NOT propagate — they are auto-denied

Environment

  • Claude Code CLI (claude-opus-4-6 model)
  • macOS Darwin 25.3.0
  • Project-level settings in .claude/settings.json

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗