Skip to content

Disable MCP elicitation in headless runs #36076

Open

Description

@opencode-agent

Problem

Headless OpenCode runs (opencode run, GitHub Actions, and other non-interactive/CI contexts) should not expose interactive elicitation paths to the model or to MCP servers.

Today MCP elicitation can require a human response. In a headless run there is no usable UI to answer it, so it can block, hang, or produce unusable behavior. This is the same class of problem as the existing question-tool behavior tracked in #10012.

Desired behavior

When OpenCode is running headlessly/non-interactively:

  • Opt out of MCP elicitation by default.
  • Do not advertise/support elicitation capabilities to MCP servers in that mode, or reject elicitation requests immediately with a clear non-interactive error.
  • Apply the same policy direction to the built-in question tool: interactive asks should not be available in opencode run/CI unless explicitly opted in through a deliberate escape hatch.

Acceptance criteria

  • opencode run does not hang waiting for MCP elicitation or question responses.
  • GitHub Action usage gets deterministic failure/skip behavior rather than an unresolved prompt.
  • Interactive clients keep their current elicitation/question behavior.
  • Tests cover at least one headless path and one interactive path.

Related

Requested by @rekram1-node from team discussion on 2026-07-09.

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

2.0coreAnything pertaining to core functionality of the application (opencode server stuff)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions