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: V1 data migration fails with SQLite syntax error on every start · Issue #41346 · anomalyco/opencode

server: V1 data migration fails with SQLite syntax error on every start #41346

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
server: V1 data migration fails with SQLite syntax error on every start#41346
Copy link
Assignees
rekram1-node
Labels
2.0

Description

@HommeSauvage
HommeSauvage
opened on Aug 9, 2026
Issue body actions

Summary

V2's V1 data migration fails on every service start with SQLiteError: near ",": syntax error, so legacy V1 session data is never imported into the V2 database.

Environment

  • opencode version: 0.0.0-next-17055 (opencode2)
  • OS: Darwin 25.2.0 (arm64)
  • Terminal: TERM=xterm-256color, TERM_PROGRAM=ghostty, COLORTERM=truecolor
  • Shell: /bin/zsh
  • Install/channel: next (updated from 0.0.0-next-17028)
  • Active plugins: none found in config

Reproduction

  1. Have a prior V1 (opencode) install whose data exists under ~/.local/share/opencode/storage/ (and opencode.db).
  2. Update/install the next channel (e.g. 0.0.0-next-17028 → 0.0.0-next-17055) and start opencode2.
  3. Observe the log:
timestamp=2026-08-09T01:20:47.672Z level=INFO run=d973732a message="updated OpenCode" from=0.0.0-next-17028 to=0.0.0-next-17055 method=bun role=cli
timestamp=2026-08-09T01:20:47.767Z level=INFO run=efe91eb9 message="database migration started" migration=20260808023530_workspace_domain role=server
timestamp=2026-08-09T01:20:47.787Z level=INFO run=efe91eb9 message="database migration completed" migration=20260808023530_workspace_domain durationMs=20 role=server
timestamp=2026-08-09T01:20:47.829Z level=ERROR run=efe91eb9 message="V1 migration failed" cause="Cause([Die(SQLiteError: near \",\": syntax error)])" role=server

The error repeats on every subsequent service start (each opencode2 serve --service boot logs another V1 migration failed with the same cause).

Expected Behavior

The V1 migration should run successfully and import legacy V1 sessions/messages into the V2 database, or fail with a meaningful error identifying the offending SQL.

Actual Behavior

The migration fails with SQLiteError: near ",": syntax error before any V1 data is imported. The failure is non-fatal — the service continues booting (watchers, location services, etc.) — but legacy V1 history is never migrated, and the error is logged on every service start.

Additional Context

  • The regular V2 DB migrations succeed; only the V1 data migration fails. The failure began immediately after updating from 0.0.0-next-17028 to 0.0.0-next-17055.
  • V1 data is present (user previously ran V1): ~/.local/share/opencode/storage/ contains V1 dirs (session_diff, migration, etc.) and a legacy opencode.db exists alongside opencode-next.db.
  • The near "," SQLite error suggests a malformed SQL statement is being generated for the migration (possibly related to the new workspace_domain handling).
  • Frequency: consistent, every service start.
  • No workarounds found; the service remains otherwise healthy.

Activity

  1. github-actions
    assigned
    rekram1-node
    on Aug 9, 2026
  2. github-actions commented on Aug 9, 2026

    @github-actions
    github-actionsBot
    on Aug 9, 2026 – with GitHub Actions
    Contributor
    More actions

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

    • V1→V2 session migration fails when previous channel DB lacks fork_boundary #41341: Same SQLiteError: near ",": syntax error on V1→V2 session migration — also triggered on every startup and includes a root cause analysis (undefined fork_boundary producing invalid SQL) and a confirmed workaround.
    • V2: V1 session history is never imported into session_v2 — old sessions invisible in OpenCode 2 #41217: Broader report of V1 session history never appearing in V2 after upgrading to the next channel.
  3. opencode-agent
    added
    2.0
    on Aug 9, 2026
  4. kitlangton commented on Aug 11, 2026

    @kitlangton
    kitlangton
    on Aug 11, 2026
    Contributor
    More actions

    This was generated by AI during triage.

    Closing as an exact duplicate of #41341. Both reports hit the same previous-channel migration failure when the source session schema lacks fork_boundary; follow-up and the fix should stay consolidated there.

  5. kitlangton
    closed this as not plannedon Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @rekram1-node
    rekram1-node

Labels

2.0

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.