Skip to content

Question tool hangs in ACP mode #17920

Closed as not planned
Closed as not planned

Description

@Meskjei

Bug Description

When OpenCode runs via ACP (Agent Client Protocol), the question tool hangs indefinitely when the LLM tries to ask the user a question.

Root Cause

In packages/opencode/src/acp/agent.ts, the handleEvent method only handles these event types:

  • permission.asked - forwarded to client via requestPermission
  • message.part.updated
  • message.part.delta

The question.asked event is not handled, so when the question tool is invoked:

  1. QuestionService.ask() publishes question.asked event
  2. A Deferred is created to wait for the answer
  3. No handler forwards this to the ACP client
  4. The tool blocks forever waiting for a response

Proposed Fix

Add a question.asked event handler in the ACP agent that:

  1. Converts the question options to ACP requestPermission options
  2. Calls connection.requestPermission() to get user input from the client
  3. Maps the response back to question answers
  4. Calls the SDK's question.reply() to unblock the tool

Impact

This affects all ACP-compatible editors (Zed, JetBrains, Neovim plugins) when the LLM tries to use the question tool.

Activity

  1. github-actions commented on Mar 17, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

  2. added a commit that references this issue on Mar 17, 2026
    05f0214
  3. rekram1-node commented on Jun 23, 2026

    @rekram1-node
    Collaborator

    Automated: closing question issues.

    GitHub Issues are for bug reports and feature requests only — questions / support are no longer tracked here.

    If this is a bug or feature request, please open a new issue with the appropriate template.

  4. rekram1-node commented on Jun 23, 2026

    @rekram1-node
    Collaborator

    Reopening – this was incorrectly closed by automated question-issue cleanup. Sorry for the noise.

  5. WaterRRabbit commented on Jun 25, 2026

    @WaterRRabbit

    +1 — we also need this. Happy to help test once #33482 / #20017 lands.

  6. github-actions commented on Aug 25, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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

Metadata

Metadata

Assignees

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