settings.local.json permissions not honored in --print mode

Resolved 💬 3 comments Opened Mar 18, 2026 by nikw9944 Closed May 1, 2026

Description

When running claude --print --permission-mode acceptEdits, the permissions.allow and permissions.deny lists in .claude/settings.local.json are not applied. All Bash commands are denied regardless of matching allow patterns.

Steps to Reproduce

  1. Create .claude/settings.local.json:
{
  "permissions": {
    "allow": ["Bash(git *)", "Bash(gh pr *)", "Bash(echo *)"],
    "deny": []
  }
}
  1. Run:
claude --print --permission-mode acceptEdits --verbose --output-format stream-json "run echo hello"
  1. The echo hello command is denied despite matching Bash(echo *) in the allow list.

Expected Behavior

Bash commands matching patterns in permissions.allow should be auto-approved, same as in interactive mode.

Actual Behavior

All Bash commands are denied. The permission_denials array in the JSONL result output contains every Bash tool use, including ones that match allow patterns.

Environment

  • Claude Code version: 2.1.76
  • Platform: Linux (Docker container on amd64), also reproduced on macOS ARM
  • The same settings.local.json works correctly in interactive (non---print) mode

Impact

This makes --print mode unusable for automated workflows that need Bash access (e.g., CI/CD, fleet management tools). The workaround is --permission-mode bypassPermissions which removes all permission controls.

Workaround

Using --permission-mode bypassPermissions instead of acceptEdits bypasses the issue but also bypasses all permission controls, including deny lists.

View original on GitHub ↗

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