opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Sessions are not saving with multi sessions on

Open PilotDevo opened this issue 2 weeks ago • 8 comments

Description

Running multiple sessions and coming back to look for one recently closed and renamed yields no results.

OpenCode version

1.0.134

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

WSL 22.04

Terminal

PS

PilotDevo avatar Dec 08 '25 15:12 PilotDevo

This issue might be related to existing session management problems. Please check:

  • #4040: Session auto naming - Sessions not being auto-named
  • #5164: Session name is not computed - Session names not being saved automatically (recently closed)
  • #4630: Previous session doesn't load - Difficulty loading previously saved sessions (recently closed)
  • #3779: Session rename not working - Issues with renaming sessions

These issues may share the same root cause in the session persistence layer, especially with multi-session mode enabled. Feel free to ignore if this is a distinct issue.

github-actions[bot] avatar Dec 08 '25 15:12 github-actions[bot]

can you clarify what you mean?

Is this multiple opencode instances and you edit in one and dont see changes in another?

Or is this 1 instance toggling between sessions and data is lost?

what happens if u close & reopen?

rekram1-node avatar Dec 08 '25 19:12 rekram1-node

When multiple windows with multiple sessions open in multiple directories the session save function and recall is failing in some capacity. Mostly happens when working in different directories, session logic is a little unclear.

PilotDevo avatar Dec 08 '25 20:12 PilotDevo

@PilotDevo have you noticed this happening when context usage is high? I have seen this happening when the context is over 150k out of 200k. A simple test is to do opencode -c on a new directory while the old one is running, and it shows partial history.

arsham avatar Dec 08 '25 20:12 arsham

we only show the last 100 messages rn, we need to paginate

rekram1-node avatar Dec 08 '25 20:12 rekram1-node

Thanks rekram, however I was referring to the last few messages and not the beginning.

arsham avatar Dec 08 '25 20:12 arsham

Ahh okay

rekram1-node avatar Dec 08 '25 20:12 rekram1-node

@PilotDevo have you noticed this happening when context usage is high? I have seen this happening when the context is over 150k out of 200k. A simple test is to do opencode -c on a new directory while the old one is running, and it shows partial history.

Yes that is correct. On any model. opencode -c does yield the old session however the only option is to export at that point as the session has crasshed and further interaction is impossible.

PilotDevo avatar Dec 09 '25 00:12 PilotDevo

Update seems to have resolved the issues... can you tell me what you found?

PilotDevo avatar Dec 10 '25 06:12 PilotDevo

uh nothing idk what cause it haha

Maybe someone else fixed it accidentally

rekram1-node avatar Dec 10 '25 06:12 rekram1-node