Skip to content

fix(opencode): show actions for wildcard permission resources - #20

Closed
AndreiShenets wants to merge 4 commits into
mainfrom
fix/opencode-mcp-approval-details
Closed

AndreiShenets wants to merge 4 commits into
mainfrom
fix/opencode-mcp-approval-details

Conversation

@AndreiShenets

@AndreiShenets AndreiShenets commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

ℹ️ Written by GPT-6.1 Sol on behalf of Andrei Shenets

Summary

OpenCode approval prompts can show wildcard resources instead of a useful action name. When any resource contains *, show the actual permission action instead, keeping the existing one-line presentation.

- *
+ github_create_issue

Only the OpenCode V2 adapter and its existing replay tests change. This also covers patterns such as git status * and /folder/*, including mixed resource lists. Commands and paths without *, approval decisions, and native permission scopes are unchanged. Web, desktop, and mobile use the existing shared approval prompt.

Related upstream UI fix: anomalyco/opencode#60548.

Evidence

  • Before: replay cases display *, git status *, or a mixed list containing /second/* instead of the action.
    After: all seven focused cases pass, including mixed resource lists, unchanged literal command/path prompts, and the empty-resource fallback.
  • Real web-client before/after screenshots were captured through the actual OpenCode adapter using a local HTTP/SSE fixture, including an MCP permission originating inside execute. The final prompt shows only github_create_issue, with no JSON or extra scope line. No paid model or real GitHub operation was run. Image attachment pending: the Browser profile is signed out of GitHub.
  • vp run check:changed: format, lint, both knip checks, generated GraphQL, and affected-package typechecks pass. Tests: 183 pass, two fail on Windows attachment path separators. Both failures were reproduced with the adapter restored byte-for-byte to the base version; they are outside this change.
  • Focused regression: vp test run apps/server/src/orchestration-v2/Adapters/OpenCode2AdapterV2.test.ts -t "shows a .* permission prompt" — 7 passed, including an execute-sourced MCP permission showing the nested action rather than execute.
  • git diff --check passes.

Merge Danger

Door: two-way

Blast Radius: OpenCode

Display-only adapter formatting; no UI, schema, persistence migration, or authorization changes. No upstream contribution or merge is requested in this PR.

Opus 5.5 reviewed the updated contains("*") behavior and tests: no material findings on either standards or requirements. Earlier feedback was addressed with execute coverage and test-label/fixture cleanup.

Created with GPT-6.1 Sol in OpenCode.

@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:S labels Nov 15, 2026
@AndreiShenets AndreiShenets changed the title fix(opencode): show MCP tool details in approval prompts fix(opencode): name tools in wildcard approval prompts Nov 15, 2026
@github-actions github-actions Bot added size:XS and removed size:S labels Nov 15, 2026
@AndreiShenets AndreiShenets changed the title fix(opencode): name tools in wildcard approval prompts fix(opencode): show actions for wildcard permission resources Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant