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 — migrate: V1-era session exists only in legacy table, invisible to V2 clients · Issue #50980 · anomalyco/opencode

migrate: V1-era session exists only in legacy table, invisible to V2 clients #50980

New issue
Copy link
New issue
Copy link
Closed as duplicate
Closed as duplicate
migrate: V1-era session exists only in legacy table, invisible to V2 clients#50980
Copy link

Description

@stevenshack
stevenshack
opened on Sep 23, 2026
Issue body actions

Summary

After upgrading from opencode 1.x to 2.0.15, a session created by V1 minutes
before the upgrade exists in the legacy session table but was never carried
into session_v2 (the live store). It is invisible to the TUI,
opencode session list, and the API — apparent data loss for the user.

Environment

  • opencode version: 2.0.15 (upgrade V1 -> V2 performed 2026-09-23)
  • OS: Linux 6.12.107+deb13-amd64 (Debian 13)
  • Terminal: xterm-256color, truecolor
  • Shell: fish
  • Install/channel: latest
  • Active plugins: none configured

Reproduction

  1. Run opencode 1.x and create a session (this one was created ~11 minutes
    before the V2 upgrade; V1 wrote it to the legacy session table only).
  2. Upgrade to opencode 2.0.15 and let the first V2 server start apply DB
    migrations.
  3. Run opencode session list in the session's directory — the session does
    not appear.
  4. Inspect the database read-only:
    • SELECT id FROM session WHERE id = 'ses_f304ef2b…'; → 1 row (legacy)
    • SELECT id FROM session_v2 WHERE id = 'ses_f304ef2b…'; → 0 rows

Expected Behavior

The V1→V2 data migration should carry every session from the legacy
session/message/part tables into session_v2 (or V2 clients should fall
back to the legacy table for sessions missing from the live store).

Actual Behavior

The session is present in the legacy projection only. No V2 client surface
shows it. It could only be recovered by manually rebuilding an export-format
JSON ({"info": …, "messages": …}) from the legacy tables and running
opencode session import --directory <dir>.

Additional Context

  • The first V2 server start did apply migrations (~54 rows in the migration
    table), so the gap is specifically this last-minute V1 write.
  • Verified workaround: manual reconstruction + re-import; all 20 messages /
    64 parts recovered intact.

Activity

  1. rekram1-node commented on Oct 21, 2026

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

    Same root cause as #50130: once the V1→V2 migration is marked complete (most likely by an earlier V2 run on this database), V1 sessions written afterwards are not imported. Tracking there.

  2. 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

No one assigned

    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.