[PR #75] [CLOSED] Add --permission-prompt-tool to match claude code format #9525

Closed
opened 2026-02-16 18:13:42 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opencode/pull/75
Author: @allisoneer
Created: 6/9/2025
Status: Closed

Base: devHead: permission_prompt_tool


📝 Commits (3)

📊 Changes

8 files changed (+429 additions, -28 deletions)

View changed files

📝 cmd/non_interactive_mode.go (+111 -19)
📝 cmd/root.go (+3 -1)
📝 internal/llm/models/anthropic.go (+15 -0)
📝 internal/llm/models/bedrock.go (+30 -0)
📝 internal/permission/permission.go (+150 -8)
internal/tui/theme/nord.go (+107 -0)
📝 internal/tui/theme/theme_test.go (+12 -0)
📝 www/src/content/docs/docs/themes.mdx (+1 -0)

📄 Description

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


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opencode/pull/75 **Author:** [@allisoneer](https://github.com/allisoneer) **Created:** 6/9/2025 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `permission_prompt_tool` --- ### 📝 Commits (3) - [`3f8f7ec`](https://github.com/anomalyco/opencode/commit/3f8f7ec5881640f40490b2f5d17504c6a390f773) feat: claude 4 opus - [`c554430`](https://github.com/anomalyco/opencode/commit/c554430c59171e2dbec4b4d311e5f7d5a8107d0b) Nord theme (#64) - [`37cc1a4`](https://github.com/anomalyco/opencode/commit/37cc1a477b69bba4a2cfce1b22897aefd8c62fb6) initial `--permission-prompt-tool` commit ### 📊 Changes **8 files changed** (+429 additions, -28 deletions) <details> <summary>View changed files</summary> 📝 `cmd/non_interactive_mode.go` (+111 -19) 📝 `cmd/root.go` (+3 -1) 📝 `internal/llm/models/anthropic.go` (+15 -0) 📝 `internal/llm/models/bedrock.go` (+30 -0) 📝 `internal/permission/permission.go` (+150 -8) ➕ `internal/tui/theme/nord.go` (+107 -0) 📝 `internal/tui/theme/theme_test.go` (+12 -0) 📝 `www/src/content/docs/docs/themes.mdx` (+1 -0) </details> ### 📄 Description 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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 18:13:42 -05:00
yindo closed this issue 2026-02-16 18:13:42 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9525