claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[FEATURE] Hook for edit or tool use approval

Open DanielBaulig opened this issue 7 months ago • 2 comments

It would be great if claude code provided some form of hook for edit or other tool use approval. E.g. call out into a shell command or into an MCP server. This would make it easier to integrate claude code into more workflows and IDEs.

I am using claude code from within a vim terminal and would love to do edit approvals within vim diff views instead of claude code's edit view.

DanielBaulig avatar Jun 17 '25 23:06 DanielBaulig

I just found this: https://docs.anthropic.com/en/docs/claude-code/sdk#custom-permission-prompt-tool

Note that neither Claude Code nor Claude Chat were able to point me to this upon asking them about edit approval customization.

DanielBaulig avatar Jun 17 '25 23:06 DanielBaulig

Ok, upon closer inspection it appears the custom permission prompt tool is only supported for the --print flag. Reopening.

DanielBaulig avatar Jun 18 '25 01:06 DanielBaulig

Merging with https://github.com/anthropics/claude-code/issues/712

dicksontsai avatar Jun 18 '25 15:06 dicksontsai

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Aug 11 '25 14:08 github-actions[bot]