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 — fix(acp): handle question.asked event to prevent hanging by Meskjei · Pull Request #17921 · anomalyco/opencode

Conversation

@Meskjei

@Meskjei Meskjei commented Mar 17, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown

Issue for this PR

Closes #17920

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

When OpenCode runs via ACP, the question tool would hang indefinitely because the question.asked event was not handled in the ACP agent's handleEvent method.

The fix adds a new case handler for question.asked that:

  1. Converts question options to ACP requestPermission options
  2. Forwards the question to the ACP client via requestPermission
  3. Maps the client's response back to question answers
  4. Calls the SDK's question.reply() or question.reject() to unblock the tool

This follows the same pattern as the existing permission.asked handler.

How did you verify your code works?

  • Ran bun run --cwd packages/opencode typecheck - passes
  • The change follows the existing permission.asked handler pattern which is proven to work

Screenshots / recordings

N/A - This is a backend change, no UI changes.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Sorry, something went wrong.

Uh oh!

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

All reactions
@Meskjei
fix(acp): handle question.asked event to prevent hanging
05f0214
When OpenCode runs via ACP, the question tool would hang indefinitely
because the question.asked event was not handled in the ACP agent.

This change adds a handler for question.asked that:
- Converts question options to ACP requestPermission options
- Forwards the question to the ACP client via requestPermission
- Maps the response back to question answers
- Calls the SDK question.reply to unblock the tool

Fixes anomalyco#17920
@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Mar 17, 2026
@github-actions

github-actions Bot commented Mar 17, 2026

Copy link
Copy Markdown
Contributor

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

Based on my search, I found one potentially related PR:

Related PR:

  • feat(acp): enable question tool for ACP clients #13750 - feat(acp): enable question tool for ACP clients
    • This PR is related as it previously enabled the question tool for ACP clients. Your PR (17921) extends that work by specifically handling the question.asked event to prevent hanging, which appears to be a follow-up fix to the earlier feature implementation.

The current PR #17921 is appropriately addressing a specific issue (issue #17920) with the question tool hanging in ACP, so this appears to be a targeted fix rather than a duplicate.

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:compliance This means the issue will auto-close after 2 hours. label Mar 17, 2026
@github-actions

github-actions Bot commented Mar 17, 2026

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

All reactions

Sorry, something went wrong.

Uh oh!

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

This was referenced Mar 20, 2026
fix: Fixes race conditions and missing error handling that cause subagents to hang indefinitely when errors occur. #18389
Closed
fix(acp): unblock question tool in ACP mode #18657
Closed
@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
@rekram1-node

rekram1-node commented May 15, 2026

Copy link
Copy Markdown
Member

Automated PR Cleanup

Thank you for contributing to opencode.

Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions.

This PR was closed because it matched the following cleanup criteria:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

PRs created within the last month are not affected by this cleanup.

If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate.

Thanks again for taking the time to contribute.

All reactions

Sorry, something went wrong.

Uh oh!

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

@rekram1-node rekram1-node closed this May 15, 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.

Question tool hangs in ACP mode

Uh oh!

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

2 participants

@Meskjei @rekram1-node
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.