Session metadata deleted during git repo initialization #3350

Closed
opened 2026-02-16 17:39:44 -05:00 by yindo · 2 comments
Owner

Originally created by @monostop on GitHub (Dec 6, 2025).

Originally assigned to: @rekram1-node on GitHub.

Description

When initializing a git repository in a directory that already has OpenCode sessions, the session metadata files are deleted but the message data is retained, causing sessions to disappear from the session picker.

OpenCode version

1.0.134

Steps to reproduce

  1. Start OpenCode in a directory that is not a git repository
  2. Have one or more active sessions with messages
  3. Initialize a git repository in that directory (git init)
  4. Restart OpenCode
  5. Previous sessions no longer appear in the session picker (opencode -c resumes another, older session).

Screenshot and/or share link

No response

Operating System

MacOS 15.6.1

Terminal

Ghostty

Originally created by @monostop on GitHub (Dec 6, 2025). Originally assigned to: @rekram1-node on GitHub. ### Description When initializing a git repository in a directory that already has OpenCode sessions, the session metadata files are deleted but the message data is retained, causing sessions to disappear from the session picker. ### OpenCode version 1.0.134 ### Steps to reproduce 1. Start OpenCode in a directory that is not a git repository 2. Have one or more active sessions with messages 3. Initialize a git repository in that directory (git init) 4. Restart OpenCode 5. Previous sessions no longer appear in the session picker (opencode -c resumes another, older session). ### Screenshot and/or share link _No response_ ### Operating System MacOS 15.6.1 ### Terminal Ghostty
yindo added the bug label 2026-02-16 17:39:44 -05:00
yindo closed this issue 2026-02-16 17:39:44 -05:00
Author
Owner

@rekram1-node commented on GitHub (Dec 6, 2025):

hm i thought i fixed this

@rekram1-node commented on GitHub (Dec 6, 2025): hm i thought i fixed this
Author
Owner

@rekram1-node commented on GitHub (Dec 7, 2025):

fixed: aa884b003

in next release

@rekram1-node commented on GitHub (Dec 7, 2025): fixed: aa884b003 in next release
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3350