Repository navigation
fix(acp): let the model continue when a question can't be shown - #52740
Merged
Merged
Conversation
Ichinose-Kazuki
pushed a commit
to Ichinose-Kazuki/opencode
that referenced
this pull request
Oct 7, 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.
Why the change
When an ACP client can't show a
questionform, the model now gets a reason and keeps going instead of the turn silently ending.Special things to note
description. The ACP spec says form mode "MUST NOT be used to request secrets or credentials". Questions caught by it go through the same fallback.denyrule was ruled out because session rules are saved, so the deny would carry over into the TUI, the app, and child sessions.message, and the question tool already returns it to the model.Change outline
Before, ACP cancelled the form with no message. Core treats that as the user dismissing the question, so the tool was marked aborted and the turn stopped with no reason given:
Now a
questionform that ACP won't show is cancelled with a message. The question tool returns it as a normal tool result and the model continues:The decision lives in
elicitation.ts. Other form kinds, such aswebsearch.provider, and a user's decline or dismissal in the client are still cancelled without a message.requestedSchemareturns undefined when the client lacks form elicitation, the form kind isn't allowed, a field looks like a credential, or ACP can't represent the form. The message doesn't name a reason, so it's accurate in every case.Tests: