fix(acp): handle question.asked event to prevent hanging#17921
Open
Meskjei wants to merge 1 commit intoanomalyco:devfrom
Open
fix(acp): handle question.asked event to prevent hanging#17921Meskjei wants to merge 1 commit intoanomalyco:devfrom
Meskjei wants to merge 1 commit intoanomalyco:devfrom
Conversation
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
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:
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. |
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
This was referenced Mar 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issue for this PR
Closes #17920
Type of change
What does this PR do?
When OpenCode runs via ACP, the
questiontool would hang indefinitely because thequestion.askedevent was not handled in the ACP agent'shandleEventmethod.The fix adds a new case handler for
question.askedthat:requestPermissionoptionsrequestPermissionquestion.reply()orquestion.reject()to unblock the toolThis follows the same pattern as the existing
permission.askedhandler.How did you verify your code works?
bun run --cwd packages/opencode typecheck- passespermission.askedhandler pattern which is proven to workScreenshots / recordings
N/A - This is a backend change, no UI changes.
Checklist