Skip to content

TUI permission prompt for MCP tools doesn't show the call arguments #60350

Open

Description

@rmcilraith

Description

When an MCP tool asks for permission, the TUI prompt shows only the tool name:

△ Permission required
  ⚙ Call tool linear_save_comment

  Tool: linear_save_comment

The arguments (which issue, what the comment says) are not shown anywhere, so approving a write means approving it blind. The tool line in the transcript above the prompt leaves out object arguments too.

Since #51062 the MCP wrapper passes the call arguments as metadata.input, so the data reaches the prompt. The fallback branch in packages/tui/src/util/permission.ts just doesn't render it. #51519 is the same problem in the web/desktop dock, and #50234 the general version of it.

Plugins

None needed to reproduce

OpenCode version

1.19.4, and still on dev (085d6f7)

Steps to reproduce

  1. Add a remote MCP server with a write tool and set its permission to ask.
  2. Ask the agent to call the write tool.
  3. The prompt shows Call tool <name> and Tool: <name>, but no arguments.

Screenshot

See the prompt above.

Operating System

macOS 26

Activity

  1. opencodejr commented on Oct 29, 2026

    @opencodejr
    Contributor

    Thanks for the clear report and for pointing to the exact code, @rmcilraith!

    You're asking for the TUI permission prompt (and the tool line in the transcript) to show the arguments of an MCP tool call, so that approving a write isn't done blind. I checked current dev. The MCP wrapper does pass the arguments as metadata.input (since #51062), but the generic branch in packages/tui/src/util/permission.ts was only ever built to show the tool name. Since the prompt is working as it was written, I've filed this as a feature request rather than a bug. Maintainers will consider it.

    This can't be done as a plugin today: the TUI plugin API has no slot for the permission prompt and no hook for how a tool call's arguments are shown.

    Related issues:

  2. rmcilraith commented on Oct 29, 2026

    @rmcilraith
    Author

    I have a small fix ready if a maintainer wants it: dev...rmcilraith:opencode:fix/tui-mcp-permission-args

    The fallback branch lists each argument under the tool name (issueId: ENG-1, body: Looks good), from the tool part input or metadata.input. Objects are shown as one line of JSON. It's about 10 lines plus a test, and tools with their own layout (edit, shell, webfetch, ...) are unchanged. Happy to open a PR or change the approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions