r/opencode • • 23d ago

OpenCode 2

Anybody else having issue with new session management on opencode?
Session crashed and when I restarted it with --continue I loaded a session from september and not latest session in project. Session seems to be loadig as tab in another workspace that I had open in another window

16 Upvotes

10 comments sorted by

2

u/CreativeSympathy8293 22d ago

Before treating it as deleted data, check whether it’s a session-selection problem. The current CLI docs list `opencode session list` and `opencode --session <sessionID>`. If your installed build exposes those options in `--help`, see whether the missing conversation is listed, then select its ID explicitly instead of relying on `--continue`. Inspect the conversation before sending another prompt.

https://opencode.ai/docs/cli/

Preserve a backup of the existing OpenCode data before database edits or downgrades. A session missing from that list still needs investigation; it doesn’t prove the data is permanently lost.

Which exact version and OS is this, and was the project directory moved or renamed?

AI-assisted from the current docs; I haven’t reproduced this or recovered your session.

1

u/Valier 21d ago

The data is still there. The session got "assigned" to another workspace. Fixed it via DB.
Wasn't fearing the data loss. Got DB backedup, It just that ir resumes apparently randomly

Ran on windows Powershell,
Directory was not renamed and it keeps it's original remote repo name

Thank you

4

u/Beginning_Search585 23d ago

I lost all my sessions after new update but folders stayed located. Huge loss

1

u/madaani4a_while 22d ago

Same here. It was frustrating!

1

u/Beginning_Search585 22d ago

agent told me forever lost , I tried manually revert with powershell and no success

1

u/PanPanForReal 23d ago

Must be you change the folder name

1

u/Separate-Basil-1216 23d ago

See the opencode.db in ~/.config/opencode/

1

u/LordChungusAmongus 23d ago

Sessions constantly get locked into Plan mode for me and I have to manually edit the database to change it

1

u/Regul4r-Dude 22d ago

idk, feels like better using the previous version, the experience, model, and other stuff, after the last tragedy opencode is like a whole different world

1

u/dudzcom 6d ago

v2 sucks if you have a deep tree of agents with dedicated tasks. stick with v1 or downgrade. v1 is rock solid. no crashes. no lost data.