Skip to content

Opencode2 support - #254

Merged
grinev merged 9 commits into
mainfrom
opencode2-support
Sep 26, 2026
Merged

grinev merged 9 commits into
mainfrom
opencode2-support

Conversation

@grinev

@grinev grinev commented Sep 26, 2026

Copy link
Copy Markdown
Owner

No description provided.

grinev and others added 9 commits September 25, 2026 15:54
OPENCODE_SERVER_VERSION=v1|v2 (default v1) selects the API client; the
default URL follows the version. V2 runs through a project adapter on
@opencode/client behind the client surface the bot already uses, with
the V2 event stream translated into the events the bot consumes.

A server of the other version is reported once in the log with both
versions; pending questions and permissions are reloaded after the event
stream reconnects; a saved session the server does not have is dropped
at startup; on V2 a permission reject clears the session's other prompts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The installed-mode wizard asks for OpenCode V1 or V2 (V2 on a first
setup, the saved choice on a re-run), offers the URL default of that
version and requires the server password for V2; a saved password is
kept on Enter.

/opencode_start and auto-restart launch the configured version: V1 a
plain server, V2 the registered background server, running whatever the
`opencode` command runs. They start nothing, reply with the generic
start failure and log the reason when the configured address rejects
the password, answers as the other version, the local executable is the
other version, or on V2 a registered V2 server runs on another port.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A freshly started V2 server lists no models for a moment after it answers
health. The model catalog, context limits and model capabilities no longer
keep an empty (or failed) read as the server's state, and the ready sequence
waits briefly for a non-empty catalog before restoring the session and the
pinned dashboard.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… custom answer

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ession inbox

On OpenCode V2 a message sent while a task runs goes to OpenCode at once:
Steer delivers it into the running turn, Queue starts its own run after
the turn. Each waiting message is a bottom-keyboard button that withdraws
it until pickup; /abort, /opencode_stop and session changes withdraw them
all. The /settings "Message queue" row becomes Off / Queue / Steer on V2
(Steer by default) and stays On/Off on V1, where the bot keeps its own
queue; the stored boolean migrates to the mode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e setting

V1 keeps the released promptQueueEnabled boolean (off by default) and V2
stores its own promptQueueMode (steer by default), so an install coming
from v0.25.3 starts in Steer on V2 and neither version's choice moves the
other's. settings.json is no longer migrated on load, and the
INITIAL_SETTINGS_PRESET promptQueueEnabled key seeds only the V1 queue.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@grinev
grinev merged commit 8fe4bbf into main Sep 26, 2026
1 check passed
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