opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Add `--permission-prompt-tool` to match claude code format

Open allisoneer opened this issue 7 months ago • 1 comments

In non interactive mode you can pass an MCP server tool to claude code in order to get custom permission approval responses. This isn't super well documented at the current moment, but it is working in a way that is described here: https://github.com/anthropics/claude-code/issues/1175#issuecomment-2927478549

This PR aims to support the same standard format/functionality that claude code exposes via the same command. This is a little messy at time of creating PR, and I will clean up, write tests, test manually, and ensure it's written in a way that I'm happy with before moving from draft status. Just wanted to get it up early (the PR) to show interest in getting the feature.

Here is the comment from the above issue that highlights the format that claude code expects the MCP server to respond in: https://github.com/anthropics/claude-code/issues/1175#issuecomment-2908916791

allisoneer avatar Jun 09 '25 21:06 allisoneer

Have talked to dax about this. Leaving open temporarily in case someone stumbles upon it, but redirecting efforts where they properly should be placed.

allisoneer avatar Jun 09 '25 21:06 allisoneer