Replies: 1 comment
-
|
Closing this one as it has been completed |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
If I understand the current flow correctly, the UI would no show the permission requests unless there are already permissions pre-approved for this action. This means if there are not enough permissions I have to manually edit them.
Moreover the interface would confusingly report that the action is completed successfully, even though it didn't
And this is what shows up in the log:
Maybe I'm missing something, but it seems like there is no way to handle this permission denial via the stream-json interface.
One way I found to handle this is to use
PreToolUsehook https://docs.anthropic.com/en/docs/claude-code/hooks#pretooluse-decision-controlI've implemented a small prototype locally, which works like this.
First, I define a hook in
~/.claude/settings.json:Now when claude would need permissions, it would communicate with the app via socket (or http, doesn't matter). Subsequently this would trigger websocket message to the user that an approval is required, which can be shown in the UI. When the user replies,
curlcommand returns and now claude knows it can proceed.What do you think about implementing that? Or is there is some other obvious way to handle this, which I'm missing?
Beta Was this translation helpful? Give feedback.
All reactions