Sessions are not saving with multi sessions on #3401

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

Originally created by @PilotDevo on GitHub (Dec 8, 2025).

Originally assigned to: @rekram1-node on GitHub.

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

Originally created by @PilotDevo on GitHub (Dec 8, 2025). Originally assigned to: @rekram1-node on GitHub. ### 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
yindo added the bug label 2026-02-16 17:39:56 -05:00
yindo closed this issue 2026-02-16 17:39:56 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Dec 8, 2025):

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] commented on GitHub (Dec 8, 2025): 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.
Author
Owner

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

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 commented on GitHub (Dec 8, 2025): 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?
Author
Owner

@PilotDevo commented on GitHub (Dec 8, 2025):

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 commented on GitHub (Dec 8, 2025): 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.
Author
Owner

@arsham commented on GitHub (Dec 8, 2025):

@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 commented on GitHub (Dec 8, 2025): @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.
Author
Owner

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

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

@rekram1-node commented on GitHub (Dec 8, 2025): we only show the last 100 messages rn, we need to paginate
Author
Owner

@arsham commented on GitHub (Dec 8, 2025):

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

@arsham commented on GitHub (Dec 8, 2025): Thanks rekram, however I was referring to the last few messages and not the beginning.
Author
Owner

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

Ahh okay

@rekram1-node commented on GitHub (Dec 8, 2025): Ahh okay
Author
Owner

@PilotDevo commented on GitHub (Dec 8, 2025):

@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 commented on GitHub (Dec 8, 2025): > [@PilotDevo](https://github.com/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.
Author
Owner

@PilotDevo commented on GitHub (Dec 10, 2025):

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

@PilotDevo commented on GitHub (Dec 10, 2025): Update seems to have resolved the issues... can you tell me what you found?
Author
Owner

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

uh nothing idk what cause it haha

Maybe someone else fixed it accidentally

@rekram1-node commented on GitHub (Dec 10, 2025): uh nothing idk what cause it haha Maybe someone else fixed it accidentally
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3401