opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Documentation on sessions

Open TheCreatorAMA opened this issue 1 month ago • 2 comments

Question

Is there documentation on how sessions are created / where they are stored?

Im asking mainly because I may use opencode in a directory that has git initialized but do something there thats not related to the project. However, if I want to reuse that session to follow up on something / see what was said, I have to go back to that directory. It would be nice to have a way to globally manage sessions rather than hopping around directories.

TheCreatorAMA avatar Dec 05 '25 04:12 TheCreatorAMA

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

  • #4048: [FEATURE]: tie working directory / directories with chat session - Requests the ability to tie working directories with sessions to avoid re-navigating
  • #3551: Sessions are now mixed with home directory session list - Related to sessions being isolated by directory
  • #1143: Create session with a different root/working directory - Requests the ability to create sessions with different working directories
  • #4980: Does OpenCode automatically clean up old session/conversation data? - Related to understanding session data storage

These issues discuss related concerns about session management, directory context, and session storage/persistence. Issue #4048 in particular seems closely related to your use case of globally managing sessions without hopping directories.

Feel free to ignore if none of these address your specific case.

github-actions[bot] avatar Dec 05 '25 04:12 github-actions[bot]

This may be helpful? https://opencode.ai/docs/troubleshooting/#storage

If you have git initialized we only show sessions for that "project"

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