Skip to content

Session history disappear after updating #35690

Description

@So-cean

OpenCode Version

1.17.14

Reproduction Steps

  1. Have OpenCode v1.17.13 installed and used for several weeks, accumulating many sessions.
  2. Allow OpenCode to auto-update to v1.17.14 (or restart it after it updates itself).
  3. Start OpenCode: opencode --port 36996
  4. Observe that the server either crashes with JSON.parse(...).map is not a function or starts but historical sessions open to a blank conversation pane.
  5. Check ~/.local/share/opencode/opencode.db: message and part tables still contain all data, but session_message / session_input / session_context_epoch are empty.

Expected Behavior

After an automatic update, all previously existing sessions and their conversation history should remain visible and readable in the TUI. Data that is still present in opencode.db should be migrated or continue to be read by the new version.

Actual Behavior

  • The TUI shows the session list, but every historical session opens with no messages.
  • The underlying message/part data is preserved, suggesting a regression in how v1.17.14 loads legacy session data rather than actual data loss.

Screenshots / Share Links

N/A — the issue is reproducible from the local database state. Relevant logs and DB dumps can be provided on request.

Operating System

Linux (OpenCode binary running on a remote Linux workstation, accessed via SSH)

Terminal

SSH terminal (issue reproduces regardless of local terminal emulator)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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