GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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

New issue
Copy link
New issue
Copy link
Closed as duplicate
Closed as duplicate
server: pre-update sessions missing from session list after update to v2.0.5#49412
Copy link
Assignees
kitlangton

Description

@sergio-asenjo
sergio-asenjo
opened on Sep 16, 2026
Issue body actions

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

  1. Have existing sessions from an older version in a project.
  2. Update to v2.0.5 and restart the server.
  3. List sessions: opencode api get "/api/session?directory=<project-dir>&order=desc&limit=100".
  4. 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

  1. github-actions
    assigned
    kitlangton
    on Sep 16, 2026
  2. github-actions commented on Sep 16, 2026

    @github-actions
    github-actionsBot
    on Sep 16, 2026 – with GitHub Actions
    Contributor
    More actions

    This issue might be a duplicate of existing issues. Please check:

    • Mixed stable/beta channels sharing one data dir silently split sessions across session and session_v2 #44028: Mixed stable/beta channels sharing one data dir silently split sessions across session and session_v2 — describes the same root cause: the one-shot V1→V2 migration stamps migration.v1-v2 = {"phase":"completed"} in kv, so sessions written to session after that stamp never appear in session_v2, making them invisible to V2 clients after cutover.
  3. rekram1-node commented on Oct 21, 2026

    @rekram1-node
    rekram1-node
    on Oct 21, 2026
    Member
    More actions

    Closing in favor of #50130, which reports the same issue and has more activity and the open fix (#54272). Tracking there.

  4. rekram1-node
    closed this as a duplicateof server: V1 sessions created after migration.v1-v2 completes are never imported #50130 on Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @kitlangton
    kitlangton

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.