Description
When you have multiple instances of opencode open (very normal) any client state can get clobbered.
If you have instance 1 and instance 2 open and you change the theme in instance 1 and then show sidebar in instance 2 the theme change saved by instance 1 will be clobbered by instance 2.
This applies to all of the current pattern client state json files (kv.json, prompt-history.jsonl for sure and I assume frecency.jsonl and models.json etc.
Plugins
None
OpenCode version
latest release and on dev branch.
Steps to reproduce
- Open two instances of opencode
- in instance one change the theme
- in instance two show sidebar (or any other value that gets saved to kv.json)
- close both instances and re-open and there is no theme change
You can do the same thing for prompt-history.
Screenshot and/or share link
Demo of bug
https://github.com/user-attachments/assets/a9fe26e4-9a3c-4a09-a395-5f260e71b353
Operating System
macOS
Terminal
Ghostty
Description
When you have multiple instances of opencode open (very normal) any client state can get clobbered.
If you have instance 1 and instance 2 open and you change the theme in instance 1 and then show sidebar in instance 2 the theme change saved by instance 1 will be clobbered by instance 2.
This applies to all of the current pattern client state json files (kv.json, prompt-history.jsonl for sure and I assume frecency.jsonl and models.json etc.
Plugins
None
OpenCode version
latest release and on dev branch.
Steps to reproduce
You can do the same thing for prompt-history.
Screenshot and/or share link
Demo of bug
https://github.com/user-attachments/assets/a9fe26e4-9a3c-4a09-a395-5f260e71b353
Operating System
macOS
Terminal
Ghostty