GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(acp): enable question tool for ACP clients by Leoyzen · Pull Request #13750 · anomalyco/opencode

Conversation

@Leoyzen

@Leoyzen Leoyzen commented Feb 15, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Summary

Enable question tool support for ACP (Agent Client Protocol) clients like Zed. This allows ACP-compatible editors to handle AI assistant questions through their native permission UI.

Fixes #13752

What Changed

For ACP Users (Zed, etc.)

When the AI assistant asks a question (e.g., "Which test file should I create?"), ACP clients now display it as a native permission prompt with selectable options:

┌─────────────────────────────────────────┐
│  Create test file?                      │
│                                         │
│  ○ Unit tests (recommended)             │
│  ○ Integration tests                    │
│  ○ Skip this step                       │
│                                         │
│           [Cancel]                      │
└─────────────────────────────────────────┘

Implementation Details

  1. Registry Update - QuestionTool is now available for ACP mode

    • Previously only available for app, cli, desktop clients
    • Now includes acp client type
  2. Event Handler - New question.asked event handler in ACP Agent

    • Maps question options to ACP PermissionOption format
    • Generates unique option IDs from labels (kebab-case)
    • Always includes a "Cancel" option for dismissal
    • Uses existing permission queue for sequential per-session handling
  3. Response Flow

    • User selects an option → calls sdk.question.reply() with the label
    • User clicks Cancel → calls sdk.question.reject()
    • Errors → gracefully rejected to prevent hanging promises

Scope & Limitations

This implements Phase 1 with the following constraints:

  • ✅ Single-select only (first question if multiple)
  • ✅ No text input (custom answers)
  • ✅ Multiple options supported (array-based)
  • ✅ Cancellation always available

Multi-select and text input support will come in a future update.

Testing

  • 6 new integration tests in test/acp/question.test.ts
  • All existing ACP tests pass (no regressions)
  • bun test test/acp/ - 12 tests passing

Verification

# Run ACP tests
bun test packages/opencode/test/acp/question.test.ts

# Type check
bun run typecheck

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

nineluj, monken, and JasonLandbridge reacted with thumbs up emoji
All reactions
  • 👍 3 reactions
Leoyzen and others added 3 commits February 16, 2026 00:26
@Leoyzen @sisyphus-dev-ai
test(acp): add question tool integration tests
e6ecd35
Add test suite for ACP question tool mapping:
- question.asked event triggers requestPermission
- Option mapping from question to permission format
- User selection handling with sdk.question.reply
- User cancellation handling with sdk.question.reject
- Multiple questions uses only first question (Phase 1)
- Dismissed outcome rejection handling

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <[email protected]>
@Leoyzen @sisyphus-dev-ai
feat(acp): enable question tool in registry
4ef3d67
Enable QuestionTool for ACP client mode by adding "acp" to the
Flag.OPENCODE_CLIENT check alongside existing "app", "cli", "desktop".

This allows ACP clients (like Zed) to use the question tool and see
question events mapped to native permission UI.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <[email protected]>
@Leoyzen @sisyphus-dev-ai
feat(acp): implement question tool handler
7530dca
Add question.asked event handler to ACP Agent:
- Maps question options to PermissionOption format
- Always includes Cancel option with reject_once kind
- Uses permission queue for sequential per-session handling
- Calls sdk.question.reply when user selects an option
- Calls sdk.question.reject when user cancels or on error
- Supports single-select only (Phase 1), uses first question

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <[email protected]>
@github-actions github-actions Bot added the needs:issue label Feb 15, 2026
@github-actions

github-actions Bot commented Feb 15, 2026

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Leoyzen
Merge branch 'dev' into feat/rfc-001-acp-question
1dc579d
@github-actions

github-actions Bot commented Feb 15, 2026

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Based on my search, I found a potential related PR:

Related PR:

  • feat(acp): add opt-in flag for question tool #13562 - "feat(acp): add opt-in flag for question tool"
    • feat(acp): add opt-in flag for question tool #13562

This PR appears to be related to your current PR #13750 as it also addresses ACP question tool functionality. The PR #13562 involves adding an opt-in flag for the question tool, which may be complementary or overlapping with the feature being enabled in PR #13750.

You should verify if #13562 is:

  1. A duplicate implementation of the same feature
  2. A previous attempt that should be superseded
  3. A related feature that should be coordinated

Otherwise, no duplicate PRs were found with the exact same scope.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot removed the needs:issue label Feb 15, 2026
@Leoyzen
Leoyzen force-pushed the feat/rfc-001-acp-question branch from fc44ea4 to 0d73d60 Compare February 15, 2026 16:56
@Leoyzen @sisyphus-dev-ai
feat(acp): support sequential display of multiple questions
330db24
Modify question.asked handler to support multi-question scenarios:
- Call request_permission separately for each question
- Use index suffix for unique toolCallId (question-id-0, question-id-1...)
- Collect all answers and reply once after last question
- Maintain permission queue for sequential execution

This allows ACP clients like Zed to display questions sequentially,
with users answering one at a time.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <[email protected]>
@Leoyzen
Leoyzen force-pushed the feat/rfc-001-acp-question branch from 0d73d60 to 330db24 Compare February 15, 2026 17:21
@Leoyzen
Merge branch 'dev' into feat/rfc-001-acp-question
2b7c842
@Leoyzen

Leoyzen commented Mar 3, 2026

Copy link
Copy Markdown
Author

@rekram1-node @adamdotdevin May you take a look at this pr?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Mar 3, 2026
📊 AI CLI 工具社区动态日报 2026-03-03 duanyytop/agents-radar#55
Closed
📊 AI CLI 工具社区动态日报 2026-03-03 duanyytop/agents-radar#60
Closed
📊 AI CLI 工具社区动态日报 2026-03-03 duanyytop/agents-radar#65
Closed
@github-actions github-actions Bot mentioned this pull request Mar 17, 2026
fix(acp): handle question.asked event to prevent hanging #17921
Closed
3 of 6 tasks
@github-actions github-actions Bot mentioned this pull request Mar 30, 2026
fix: support ACP question prompts via extMethod #20016
Closed
@opencode-agent
opencode-agent Bot force-pushed the dev branch from 2f2ed11 to 9f201d6 Compare April 16, 2026 21:55
@github-actions

github-actions Bot commented May 2, 2026

Copy link
Copy Markdown
Contributor

Closing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot closed this May 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

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

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@Leoyzen
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.