GeezerVison is showing github.com — server: pre-update sessions missing from session list after update to v2.0.5 · Issue #49412 · anomalyco/opencode
server: pre-update sessions missing from session list after update to v2.0.5 #49412
Description
Summary
After updating from V1 (1.18.x) to 2.0.5, sessions created while still on V1
no longer appear in the session list (web UI or GET /api/session). Only
sessions migrated during an earlier V2 beta trial plus newly created ones
are listed. The missing sessions still exist in the database.
Environment
- opencode version: 2.0.5
- OS: Linux 7.2.6-arch2-1 (linux x64)
- Terminal: TERM=xterm-256color
- Shell: /usr/bin/bash
- Install/channel: latest
- Active plugins: opencode-claude-auth@latest
Reproduction
- Have existing sessions from an older version in a project.
- Update to v2.0.5 and restart the server.
- List sessions:
opencode api get "/api/session?directory=<project-dir>&order=desc&limit=100".
- Observe the list jumps from today's sessions straight back to sessions
from over a month ago; everything in between is missing.
Expected Behavior
Previously created sessions remain listed after the update (per the V1→V2
migration guide, supported V1 behavior is intended to keep working).
Actual Behavior
The API serves rows from the session_v2 table, which is missing all
sessions written by V1 after a one-shot data migration ran during an
earlier V2 beta trial alongside V1. The beta shared the default data
directory (single opencode.db, OPENCODE_DB unset), so it recorded
migration.v1-v2 = {"phase":"completed"} in the same database V1 kept
using daily. After cutover, 2.0.5 treats the migration as done and serves
the stale snapshot: the missing sessions exist only in the legacy session
table, with full transcripts in message/part and zero rows in
session_message, invisible to all clients. No error is logged.
Additional Context
- Consistent/reproducible across web UI and API, both filtered and unfiltered
(session.list defaults to newest 50).
- Server runs as
opencode serve under systemd; same data directory before
and after the update (OPENCODE_DB not set).
- The migration guide advises keeping the V1 setup until V2 is confirmed,
which makes this sequence (trial V2 → keep using V1 → cut over later)
likely for other users too.
Activity
github-actions commented on Sep 16, 2026
This issue might be a duplicate of existing issues. Please check:
rekram1-node commented on Oct 21, 2026
Closing in favor of #50130, which reports the same issue and has more activity and the open fix (#54272). Tracking there.
Metadata
Metadata
Development
No branches or pull requestsIssue actions