[FEATURE]: Enable question tool for ACP clients (Zed, etc.) #9408

Open
opened 2026-02-16 18:12:23 -05:00 by yindo · 2 comments
Owner

Originally created by @Leoyzen on GitHub (Feb 15, 2026).

Originally assigned to: @rekram1-node on GitHub.

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Problem

When using OpenCode with ACP (Agent Client Protocol) compatible editors like Zed, the AI assistant cannot ask questions to the user. Questions get silently dropped, blocking interactive workflows.

Background

The question tool was previously disabled for ACP mode in PR #11379 due to issues with specific clients. However, this blanket disable causes a regression:

  • AI cannot ask clarifying questions ("Which test framework should I use?")
  • Users cannot make choices from predefined options
  • Flows requiring user input cannot complete

Current Behavior

AI: I'll create a test file for you. Which framework would you prefer?
[User sees nothing - question is silently ignored]
AI: [proceeds with random/default choice]

Expected Behavior

AI: I'll create a test file for you. Which framework would you prefer?
[Zed shows native permission dialog with options]
User selects "Vitest"
AI: [proceeds with Vitest test file]

Proposed Solution

Enable question support for ACP clients by mapping question events to the existing request_permission flow. This approach:

  1. Works immediately with existing ACP clients (no protocol changes)
  2. Uses native UI - clients display questions through their permission dialog UI
  3. Is future-proof - can migrate to ACP's upcoming Elicitation spec(https://github.com/agentclientprotocol/agent-client-protocol/pull/376) later without breaking changes

Implementation

  1. Add "acp" to the QuestionTool client whitelist
  2. Implement question.asked event handler in ACP Agent
  3. Map question options to PermissionOption format
  4. Add "Cancel" option for dismissal

Scope

In scope:

  • Single-select questions (most common use case)
  • Mapping to native permission UI
  • Cancellation support

Out of scope (future work):

  • Text input questions
  • Multi-select questions
  • Custom form layouts

These limitations will be addressed when ACP's Elicitation specification (PR #376) is finalized.

Verification

Tests included in PR:

  • Question triggers permission request
  • Option mapping works correctly
  • Selection resolves to correct answer
  • Cancellation properly rejects

Related

Originally created by @Leoyzen on GitHub (Feb 15, 2026). Originally assigned to: @rekram1-node on GitHub. ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request ## Problem When using OpenCode with ACP (Agent Client Protocol) compatible editors like Zed, the AI assistant cannot ask questions to the user. Questions get silently dropped, blocking interactive workflows. ### Background The `question` tool was previously disabled for ACP mode in PR #11379 due to issues with specific clients. However, this blanket disable causes a regression: - AI cannot ask clarifying questions ("Which test framework should I use?") - Users cannot make choices from predefined options - Flows requiring user input cannot complete ### Current Behavior ``` AI: I'll create a test file for you. Which framework would you prefer? [User sees nothing - question is silently ignored] AI: [proceeds with random/default choice] ``` ### Expected Behavior ``` AI: I'll create a test file for you. Which framework would you prefer? [Zed shows native permission dialog with options] User selects "Vitest" AI: [proceeds with Vitest test file] ``` ## Proposed Solution Enable question support for ACP clients by mapping question events to the existing `request_permission` flow. This approach: 1. **Works immediately** with existing ACP clients (no protocol changes) 2. **Uses native UI** - clients display questions through their permission dialog UI 3. **Is future-proof** - can migrate to ACP's upcoming Elicitation spec(https://github.com/agentclientprotocol/agent-client-protocol/pull/376) later without breaking changes ### Implementation 1. Add "acp" to the QuestionTool client whitelist 2. Implement `question.asked` event handler in ACP Agent 3. Map question options to PermissionOption format 4. Add "Cancel" option for dismissal ### Scope **In scope:** - Single-select questions (most common use case) - Mapping to native permission UI - Cancellation support **Out of scope (future work):** - Text input questions - Multi-select questions - Custom form layouts These limitations will be addressed when ACP's Elicitation specification (PR #376) is finalized. ## Verification Tests included in PR: - Question triggers permission request - Option mapping works correctly - Selection resolves to correct answer - Cancellation properly rejects ## Related - Previous disable: PR #11379 - Community request for opt-in: Issue #13567, PR #13562
yindo added the discussion label 2026-02-16 18:12:23 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 15, 2026):

This issue appears to be a duplicate or closely related to #13567, which also requests enabling the question tool for ACP clients.

Both issues are trying to solve the same root problem (questions being disabled for ACP clients like Zed after PR #11379), but propose different approaches:

  • #13567 proposes an opt-in environment flag for flexibility
  • #13752 proposes mapping questions to the native permission UI

Please review #13567 to avoid duplicate work. The maintainers may want to consider which approach is more appropriate, or whether both can be combined.

@github-actions[bot] commented on GitHub (Feb 15, 2026): This issue appears to be a duplicate or closely related to #13567, which also requests enabling the question tool for ACP clients. Both issues are trying to solve the same root problem (questions being disabled for ACP clients like Zed after PR #11379), but propose different approaches: - #13567 proposes an opt-in environment flag for flexibility - #13752 proposes mapping questions to the native permission UI Please review #13567 to avoid duplicate work. The maintainers may want to consider which approach is more appropriate, or whether both can be combined.
Author
Owner

@Leoyzen commented on GitHub (Feb 15, 2026):

The proposed effect in zed acp mode:

Image
@Leoyzen commented on GitHub (Feb 15, 2026): The proposed effect in zed acp mode: <img width="1079" height="1133" alt="Image" src="https://github.com/user-attachments/assets/0cb5953a-ff93-4d4a-8b83-d73928f0f9cf" />
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9408