anomalyco / anomalyco/opencode

opencode --continue fails with "Unexpected server error" (TUI fetches /session/dummy)

Open
#47,556 1 comment 0 reactions 1 assignee View on GitHub

@simonklee is already working on this.

Since Sep 6, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

On opencode --continue the TUI seeds a placeholder session route with sessionID: "dummy" (packages/tui/src/app.tsx, introduced in fe0c4f8c74 / #31049). The session route eagerly calls session.get({ sessionID }, { throwOnError: true }) on mount, so the client sends GET /session/dummy. The server rejects it with 400 because SessionID requires the ses_ prefix (packages/schema/src/session-id.ts), and the TUI surfaces it as "Unexpected server error. Check server logs for details."

Introduced by #31049 (2026-06-06) which changed the placeholder from undefined to "dummy". Only reproducible when the route mounts before the continue effect resolves the real session id — e.g. OPENCODE_FAST_BOOT=1 or slow /session list.

Steps to reproduce
  1. OPENCODE_FAST_BOOT=1 opencode --continue on a machine with session history
  2. Watch the server log: GET /session/dummy → 400
  3. TUI shows "Unexpected server error"
Plugins

none

OpenCode version

1.18.29 (and dev HEAD bbd72fb8b0)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.