Hacker News new | ask | show | jobs
Claude Code Permission Policy (github.com)
1 points by defrex 106 days ago
1 comments

I quite like this idea, but am still unhappy about how I don't have control over the interactive permission prompt.

I've been thinking about this a lot, and what I'd love to have is an ability to get these interactive prompts with a timeout (e.g. 5mins), and if I don't respond within the time, have it be treated as a reject, so it'll have to either come up with a workaround, or halt with an explanation of why the rejected approach is required for success.

I haven't looked at the code yet, but am wondering if there's way for me to implement it myself, but from an earlier exploration, I couldn't find a way to regain control after giving the user a prompt within the same terminal session.

Moreover, given how Claude Code often gives me silly interactive prompts for compound commands, when each individual part would be approved, I think that Claude Code should be given a way to know what is auto-approved and what isn't, so it'll always strive to use auto-approved commands when possible. For example, I just got a silly request to approve this, blocking it from proceeding (where each is obviously safe):

> git log --oneline -1 && echo "---" && git status

> Command contains quoted characters in flag names ... Do you want to proceed?

That compound command issue is infuriating, and really what drove me to make this.

FWIW, the prompt is easily adjustable in a `.claude/PERMISSION_POLICY.md` file in the project.

It's also quite easy to remix the script with claude to meet your needs. Right now it prompts the user and runs the script, so it's a race. If you added a delay in the script and increased the hook timeout in `.claude/settings.json` you should be able to accomplish what you're looking for pretty easily.