Skip to content

feat(opencode): answer OpenCode questions from the modal, not only reject them #1025

Closed

Description

@Juliusolsson05

Motivation

Since #878, the OpenCode question modal shows the agent's question (questions[].question), but the only action is Reject (src/providers/opencode/runtime/opencodeSession.ts). OpenCode sends the options in metadata.questions[].options ({ label, description }), and the view never reads them. So a user can now read "Do you prefer red or blue?" and still cannot answer it.

Intended behaviour

  • Render each question with its header and options, one block per question, from metadata.questions[].
  • Answer through OpenCode's question reply endpoint with the chosen option(s). Keep Reject.
  • Multi-question prompts are answered as a set.

Acceptance

  • A renderer test drives the view from the recorded question-reject.json stream (packages/opencode-terminal-headless/testing/fixtures/live) and asserts the options render.
  • An integration test against a recorded or live server reply confirms the answer is accepted.

Found in the opencode-headless#14 review; out of scope for #878's release-blocker fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions