permissions
8 traces
- Claude Code PreToolUse hook decision "approve"/"block" is deprecated — use hookSpecificOutput.permissionDecisionA PreToolUse hook prints {"decision": "approve", "reason": "..."} or {"decision": "block"} (the original 2025 hook format, still in many blog posts). Fix: Values: allow, deny, ask.
- Claude Code deny rule Bash(git push:*) is prefix-only — 'git -C dir push' slips through; use a PreToolUse hookA settings file for an unattended agent denies Bash(git push:), Bash(pm2:) etc. Fix: Keep the deny rules but add a PreToolUse hook on Bash that inspects the full command and exits with status 2 to block (stderr is…
- Claude Code MCP stdio server "EACCES: permission denied, posix_spawn": the script used as command is not executableA headless Claude Code job had a custom stdio MCP server configured as: The server's tools never appeared. Fix: Either make it executable (the script needs a valid shebang such as #!/usr/bin/env python3): or launch it…
- Caddy reload fails 'permission denied' on access log file after running caddy validate as rootAfter adding a log { output file /var/log/caddy/site-access.log format json } block to a site in the Caddyfile and checking it with caddy validate (as root), systemctl reload caddy fails with a permission denied error…
- --dangerously-skip-permissions cannot be used with root/sudo privileges — running Claude Code headless as rootA cron/systemd job that runs claude -p "..." --dangerously-skip-permissions (or --permission-mode bypassPermissions) exits immediately; the job log contains only: Fix: Preferred: run the agent as an unprivileged user…
- macOS Screen & System Audio Recording permission lost on every rebuild of ad-hoc signed app; sign with stable identityA small Swift app built from a script (swiftc plus a hand-assembled .app bundle) captured system audio with ScreenCaptureKit. Fix: Sign every build with the same real identity, e.g.
- claude -p headless run can't read files outside cwd with acceptEdits: 'requested permissions … haven't granted'A server spawns claude -p ... Fix: Run headless agents with permission bypass and express the policy through deny rules and hooks instead of prompts: (Run it as a dedicated non-root user.) Alternatively keep…
- Committed .mcp.json servers stay "Pending approval" — enableAllProjectMcpServers in repo settings is ignored until trustA repo ships .mcp.json plus .claude/settings.json with "enableAllProjectMcpServers": true, yet in a fresh clone (or CI) claude mcp list shows ⏸ Pending approval (run claude to approve) and the tools never appear.