Skip to content

Session persistence failure: Session ses_3d1c654a7ffew6gK7sAuRuJTFt lost #12310

Closed as not planned

Description

@Antonio-Bennett

Bug Description

Session data was lost despite the session ID being displayed. When attempting to resume the session using -s flag, opencode returns "undefined" instead of loading the session.

Steps to Reproduce

  1. Create a new opencode session (displays session ID: ses_3d1c654a7ffew6gK7sAuRuJTFt)
  2. Work in the session for 1+ hours
  3. Try to resume session: opencode -s ses_3d1c654a7ffew6gK7sAuRuJTFt
  4. Session loads as "undefined" and all work is lost

Expected Behavior

Session should be resumed with all conversation history and context intact.

Actual Behavior

Session shows "undefined" and appears to be a fresh session.

Environment

  • Platform: Linux
  • Date: 2026-02-05
  • Session created: 2026-02-05T14:34:17.304Z

Additional Context

The session directory was checked at ~/.opencode/messages/ but the session ID ses_3d1c654a7ffew6gK7sAuRuJTFt was not found. Only these sessions existed:

  • ses_41ecfcb82ffejhPSBOABNhK9QD
  • ses_45c8e3564ffeoihhT8Z8D29sYO
  • ses_46c782dcaffekGTzMPEr2LON0A
  • ses_4710b1c28ffeLw4Xykahv0XYg7

This suggests the session was never persisted to disk despite being created.

Activity

  1. github-actions commented on Feb 5, 2026

    @github-actions
    Contributor

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

    • Session not found: ses_xxxxxx #12002: Session not found: ses_xxxxxx - describes the same issue of sessions being inaccessible via the -s flag, with evidence of JSON file corruption being the root cause

    Feel free to ignore if this doesn't address your specific case.

  2. yanniboi commented on Mar 3, 2026

    @yanniboi

    I have this issue intermittently. Most of my sessions are fine, but yesterday I worked 8+ hours on 4 different sessions all in the same project and today after close and restart they are all gone. I looked at sessions in ~/.local/share/opencode/storage/sessions and there is neither a project or session available for the work I did yesterday.

    I am working in Ubuntu linux.

  3. github-actions commented on May 3, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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