Skip to content

fix(dialog): handle opencode builds that advertise forms they never show - #1773

Merged
db-lyon merged 1 commit into
integration/nextfrom
fix/1459-opencode-dialogs
Nov 5, 2026
Merged

db-lyon merged 1 commit into
integration/nextfrom
fix/1459-opencode-dialogs

Conversation

@db-lyon

@db-lyon db-lyon commented Nov 5, 2026

Copy link
Copy Markdown
Owner

Refs #1459

opencode advertised MCP elicitation from 2.0.18 but never displayed the form until 2.1.4 (anomalyco/opencode#58184). ue-mcp resolved blocking dialogs to interactive on those builds and the call waited on a form nobody saw.

  • elicitationUnrenderedNote in src/dispatch/client-quirks.ts identifies opencode below 2.1.4 by the clientInfo it sends (opencode, app version).
  • buildElicit reports such a client as unable to elicit, so dialogs default to defer and an explicit interactive falls back to defer. Its elicit function refuses instead of sending an unanswerable request.
  • The defer refusal appends the note so the person learns why no form appeared.
  • opencode 2.1.4+ is untouched: it advertises elicitation: { form, url }, renders form schemas (enum, oneOf, multiselect arrays, boolean) in the TUI, desktop and web, and allows a 12 hour tool call, so the existing interactive path works by spec.

Verification: npx tsc --noEmit, npx vitest run tests/unit/opencode-elicitation.test.ts tests/unit/client-quirks.test.ts tests/unit/dialog-guard.test.ts tests/unit/stop-editor-unsaved.test.ts tests/unit/guards.test.ts tests/unit/pie-script-watch.test.ts, integration tests/integration/dialog-mode.test.ts. Two failures on integration/next (module-inventory missing editor/module-owner.ts, offline classification) predate this branch.

Remaining live check: drive a blocking dialog from opencode 2.1.4+ and confirm the form appears and the chosen button is pressed.

opencode advertised MCP elicitation from 2.0.18 but dropped every
elicitation/create until 2.1.4 (anomalyco/opencode#58184). ue-mcp read the
capability, resolved dialogs to interactive, and the blocked call waited on a
form the person never saw.

The elicitation probe now treats opencode below 2.1.4 as unable to elicit, so
dialogs default to defer and interactive falls back to defer. The defer
refusal names the opencode version and says to upgrade, and the elicit
function refuses rather than sending a request that cannot be answered.
opencode 2.1.4 and later are untouched and keep the form.

Refs #1459
@db-lyon
db-lyon merged commit bdf997c into integration/next Nov 5, 2026
@db-lyon
db-lyon deleted the fix/1459-opencode-dialogs branch November 5, 2026 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant