Skip to content

client state clobbered w/ multiple instances of opencode #19436

Closed as not planned

Description

@elijahmorg

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

  1. Open two instances of opencode
  2. in instance one change the theme
  3. in instance two show sidebar (or any other value that gets saved to kv.json)
  4. 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

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Mar 27, 2026
  2. removed
    bugSomething isn't working
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  3. github-actions commented on Jul 5, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions