You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OpenCode Desktop and OpenCode CLI share ~/.local/share/opencode/opencode.db. When Desktop (or a newer runtime) applies migration 20260622142730_simplify_session_context_epoch (from PR #33378), it drops session_context_epoch.replacement_seq / revision / agent.
An older CLI still on PATH (here: npm opencode-ai@1.17.3) still calls SessionContextEpoch.requestReplacement during SessionPrompt.createUserMessage. Headless callers such as Multica invoke:
opencode run --format json --dangerously-skip-permissions --dir <workdir> --model <provider/model> "..."
and immediately get:
{"type":"error","error":{"name":"UnknownError","data":{"message":"Unexpected server error. Check server logs for details.","ref":"err_..."}}}
With --print-logs:
SQLiteError: no such column: replacement_seq
at SessionContextEpoch.requestReplacement
at SessionPrompt.createUserMessage
at SessionPrompt.prompt
(then the next missing column after manually adding replacement_seq was session_context_epoch.revision)
Multica / CLI opencode run: fails with Unexpected server error (old binary + new schema)
DB evidence
migration table includes 20260622142730_simplify_session_context_epoch
PRAGMA table_info(session_context_epoch) had only: session_id, baseline, snapshot, baseline_seq (no replacement_seq / revision)
This is the same class of failure as “old code meets new schema” described in #33773 / #33898, but the trigger here is Desktop + independently installed older CLI on PATH, not an intentional downgrade. Tools that shell out to opencode (Multica, etc.) hit this easily because Desktop auto-updates the shared DB while npm/nvm CLI stays pinned.
Plugins
oh-my-openagent in ~/.config/opencode/opencode.jsonc (failure also reproduces the same SQLite error path; schema mismatch is the blocker before model I/O)
OpenCode version
Desktop: @opencode-aidesktop (sessions logged as version=local / newer schema owner)
CLI on PATH used by Multica: 1.17.3 (opencode-ai@1.17.3 via nvm/npm)
Steps to reproduce
Install/use OpenCode Desktop long enough for migration 20260622142730_simplify_session_context_epoch to run on ~/.local/share/opencode/opencode.db
Keep an older CLI on PATH (e.g. npm opencode-ai@1.17.3) that still contains requestReplacement
Confirm Desktop chat can send messages
Run:
opencode run --print-logs --format json --dangerously-skip-permissions --dir <any-existing-dir> --model <configured-model>"hi"
Observe Unexpected server error / SQLiteError: no such column: replacement_seq
Align CLI version with the runtime that migrated the DB (opencode upgrade to match Desktop), or temporarily re-add dropped columns for the older CLI (fragile).
Description
OpenCode Desktop and OpenCode CLI share
~/.local/share/opencode/opencode.db. When Desktop (or a newer runtime) applies migration20260622142730_simplify_session_context_epoch(from PR #33378), it dropssession_context_epoch.replacement_seq/revision/agent.An older CLI still on PATH (here: npm
opencode-ai@1.17.3) still callsSessionContextEpoch.requestReplacementduringSessionPrompt.createUserMessage. Headless callers such as Multica invoke:and immediately get:
{"type":"error","error":{"name":"UnknownError","data":{"message":"Unexpected server error. Check server logs for details.","ref":"err_..."}}}With
--print-logs:(then the next missing column after manually adding
replacement_seqwassession_context_epoch.revision)Observed split behavior on the same machine
opencode run: fails with Unexpected server error (old binary + new schema)DB evidence
migrationtable includes20260622142730_simplify_session_context_epochPRAGMA table_info(session_context_epoch)had only:session_id, baseline, snapshot, baseline_seq(noreplacement_seq/revision)This is the same class of failure as “old code meets new schema” described in #33773 / #33898, but the trigger here is Desktop + independently installed older CLI on PATH, not an intentional downgrade. Tools that shell out to
opencode(Multica, etc.) hit this easily because Desktop auto-updates the shared DB while npm/nvm CLI stays pinned.Plugins
oh-my-openagentin~/.config/opencode/opencode.jsonc(failure also reproduces the same SQLite error path; schema mismatch is the blocker before model I/O)OpenCode version
@opencode-aidesktop(sessions logged asversion=local/ newer schema owner)1.17.3(opencode-ai@1.17.3via nvm/npm)Steps to reproduce
20260622142730_simplify_session_context_epochto run on~/.local/share/opencode/opencode.dbopencode-ai@1.17.3) that still containsrequestReplacementUnexpected server error/SQLiteError: no such column: replacement_seqScreenshot and/or share link
N/A — log excerpt above.
Operating System
Windows 10 (win32 10.0.19045)
Terminal
PowerShell / Multica desktop daemon (
multica daemonspawning CLI)Expected
Either:
Workaround
Align CLI version with the runtime that migrated the DB (
opencode upgradeto match Desktop), or temporarily re-add dropped columns for the older CLI (fragile).Related
replacement_seqerror after old code + new schema