anomalyco / anomalyco/opencode
opencode --continue fails with "Unexpected server error" (TUI fetches /session/dummy)
@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
OPENCODE_FAST_BOOT=1 opencode --continueon a machine with session history- Watch the server log:
GET /session/dummy→ 400 - TUI shows "Unexpected server error"
Plugins
none
OpenCode version
1.18.29 (and dev HEAD bbd72fb8b0)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.