tui: permission prompt does not display message set by permission.evaluate hook
Maintainers usually reply within 1 day
@ningsiyuan1024 is already working on this.
Since Dec 1, 2026.
- #67631 by @bbabi0901 — closed without merging
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 74/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- developer-experience, frontend
Research direction
Trace the TUI permission prompt that renders Permission required and inspect how it receives Permission.Request. Start by searching the TUI code for that prompt and for request.message; the issue identifies the permission.asked event as carrying the message. Done when the prompt displays the supplied message for an escalated request.
Written by the indexing model from the issue text.
Description
Summary
When a server plugin sets event.message in a permission.evaluate hook and escalates to effect = "ask", OpenCode's server attaches message to Permission.Request and sends it in permission.asked, but the TUI permission prompt never renders it.
Environment
- opencode version: 2.4.3
- Client: TUI
- Model and provider: Not relevant
- OS: Darwin 25.6.0 (darwin arm64)
- Terminal: TERM_PROGRAM=ghostty, TERM=xterm-256color, COLORTERM=truecolor
- Shell: /bin/zsh
- Install/channel: latest
- Active plugins:
@mattietk/opencode-clef-guard@latest(opencode.json);@mattietk/opencode-queue-steer@latest,@mattietk/opencode-session-diff@latest,@mattietk/opencode-session-tree@latest(cli.json)
Reproduction
- Register a server plugin with a
permission.evaluatehook that escalates an action toaskwith a message:await ctx.permission.hook("evaluate", (event) => { if (event.action === "shell") { event.effect = "ask" event.message = "Flagged by policy (score 0.68 >= 0.40)" } }) - Trigger a
shelltool call in a TUI session. - Observe the permission prompt displayed in the TUI.
Expected Behavior
Per the Server plugins documentation ("message appears in an escalated permission request or becomes the denial reason"), the TUI permission prompt should display request.message so the user can see why the plugin escalated the action.
Actual Behavior
The TUI permission prompt only shows Permission required, the action/command details, and the approval options (Allow once, Allow always, Reject). request.message is never displayed, even though Permission.Request.message is present in the permission.asked event and in context.data.session.permission.list(sessionID).
Additional Context
- Reproducible consistently for every permission action (
shell,edit,webfetch,external_directory). - Workaround: shipping a companion
./tuiplugin that readscontext.data.session.permission.list(sessionID)and rendersrequest.messagein thesession.composer.topslot above the prompt.
- Dominant language
- TypeScript
- Stars
- 230k
- Forks
- 31.3k
- Avg merge
- 6h 58m
- Merged PRs (30d)
- 471
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from anomalyco/opencode
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
area/tui type/feature version/v2
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
anomalyco/opencode#67749 · 1 comment ·
Maintainers usually reply within 1 day
-
area/web platform/ios type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
anomalyco/opencode#67504 · 1 comment ·
Maintainers usually reply within 1 day
-
area/tui platform/macos type/feature version/v2
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
anomalyco/opencode#67490 · 2 comments ·
Maintainers usually reply within 1 day
-
Plain source starting with `let ftype` is attached as video/mp4May be free again A pull request for this issue was closed without being merged. Openarea/core platform/macos status/repro-simulated type/bug version/v2
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
anomalyco/opencode#67448 · 1 comment ·
Maintainers usually reply within 1 day
All issues in anomalyco/opencode
Similar issues
-
area:vscode bug has repro platform:macos platform:vscode regression
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
anthropics/claude-code#113502 ·
-
Add: Rajdhani TV HDOpencheck:passed streams:add
Difficulty 1/5 Under an hour Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
effort/l priority/p1 risk/high triage/core
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
iflytek/skillhub#1188 · 1 comment ·
Maintainers usually reply within 1 day
-
enhancement needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Fission-AI/OpenSpec#2337 ·
Maintainers usually reply within 1 day
-
Edit Network Properties can't be closed in a narrow windowPossibly taken @hridhinvarkeyjoseph claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
cytoscape/cytoscape-web#1027 ·
Maintainers usually reply within 1 day