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(core): let form cancellation carry a message by jlongster · Pull Request #52137 · anomalyco/opencode

Conversation

@jlongster

@jlongster jlongster commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Type of change

  • New feature

What does this PR do?

opencode run has nobody to answer the question tool. Today it cancels the form, the tool dies with QuestionTool.CancelledError (a decline), the step is interrupted and the run stops. This mirrors #51968 for permissions: a cancellation can now carry a message, and a question cancelled with a message becomes ordinary model-visible tool output, so the model continues.

  • API: session.form.cancel accepts an optional message query parameter (DELETE …/form/:formID?message=…). Requests without it behave exactly as before.
  • Schema / core: the cancelled form state has an optional message. Form.cancel(id, { message }) records it.
  • question tool: cancelled with a message → ToolFailure(message), and the model continues in the same turn. Cancelled without one → the existing CancelledError decline, unchanged (for example the TUI's Esc).
  • opencode run: outside V1 compatibility, question forms (metadata.kind === "question") are cancelled with a message and the run keeps following the session. Other forms and V1 mode keep today's cancel-and-stop behavior.
  • Regenerated client. openapi.json carries only this change; check:generated was already failing on v2 for unrelated drift.
✗ Asked 1 question failed
Error: This non-interactive run cannot ask the user questions, so the question was cancelled. Continue without an answer; make reasonable assumptions and state them.
> build · …
<model's final answer>

How did you verify your code works?

  • bun typecheck in schema, core, server, protocol, client, plugin, cli, tui, app and sdk.
  • packages/core: bun test test/form.test.ts test/tool-question.test.ts is 34 pass / 0 fail. packages/cli: bun test test/run is 11 pass / 0 fail.
  • End to end with opencode-drive (server and CLI from this branch, simulated LLM):
    • model asks once → cancelled with message → model sees the message and answers; exit 0, 2 model requests.
    • model asks three times, then answers → all cancelled, run continues; exit 0, 4 model requests.
    • Current v2 for contrast: "The user dismissed this question", 1 model request, exit 1.

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
@jlongster
feat(core): let form cancellation carry a message
8877217
@jlongster jlongster mentioned this pull request Sep 29, 2026
fix(cli): answer subagent asks in run and keep parallel rejections continuing #52146
Merged
3 tasks done
@jlongster
chore(www): regenerate OpenAPI documents
b7fb5ce
@jlongster
jlongster merged commit 02c3891 into v2 Sep 30, 2026
11 of 13 checks passed

Uh oh!

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

@jlongster
jlongster deleted the form-cancel-message branch September 30, 2026 13:20
@shuv1337 shuv1337 mentioned this pull request Sep 30, 2026
chore(sync): merge upstream v2 through v2.0.21 shuv1337/shuvcode#371
Merged
2 of 6 tasks
@nexxeln nexxeln mentioned this pull request Oct 1, 2026
chore(protocol): regenerate the OpenAPI document and check it in CI #52483
Closed
@Blind-Striker Blind-Striker mentioned this pull request Oct 4, 2026
CI does not check packages/protocol/openapi.json; committed spec drifts #53105
Closed
Ichinose-Kazuki pushed a commit to Ichinose-Kazuki/opencode that referenced this pull request Oct 7, 2026
@jlongster
feat(core): let form cancellation carry a message (anomalyco#52137)
e3062eb
@neriousy neriousy mentioned this pull request Oct 21, 2026
Disable MCP elicitation in headless runs #36076
Closed
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.

Uh oh!

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

1 participant

@jlongster
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.