Skip to content

Reduce Claude Code permission prompts#46

Merged
hockeybuggy merged 1 commit into
mainfrom
reduce-approval-friction
Jul 17, 2026
Merged

Reduce Claude Code permission prompts#46
hockeybuggy merged 1 commit into
mainfrom
reduce-approval-friction

Conversation

@hockeybuggy

Copy link
Copy Markdown
Owner

The gh api PreToolUse hook matched the endpoint path, so read-only GETs to comments/reviews endpoints prompted for confirmation just like writes. Common test and lint commands like bundle exec rspec and uv run pytest also prompted on every run.

Narrow the hook to fire only when the call actually mutates (has -X POST/PATCH/PUT/DELETE or field flags), and add an allow list covering those test runners plus read-only checks (uv run pyright, uv run black --check).

Also fix deep_merge in bootstrap.sh to union list values instead of replacing them. Previously the allow array in settings.local.json overwrote any tracked allow entries in settings.json, so these new rules would have been wiped on the next bootstrap.

🤖 Generated with Claude Code

The `gh api` PreToolUse hook matched the endpoint path, so read-only
GETs to `comments`/`reviews` endpoints prompted for confirmation just
like writes. Common test and lint commands like `bundle exec rspec`
and `uv run pytest` also prompted on every run.

Narrow the hook to fire only when the call actually mutates (has
`-X POST/PATCH/PUT/DELETE` or field flags), and add an `allow` list
covering those test runners plus read-only checks (`uv run pyright`,
`uv run black --check`).

Also fix `deep_merge` in `bootstrap.sh` to union list values instead
of replacing them. Previously the `allow` array in
`settings.local.json` overwrote any tracked `allow` entries in
`settings.json`, so these new rules would have been wiped on the next
bootstrap.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@hockeybuggy
hockeybuggy merged commit 54ffe1d into main Jul 17, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant