Skip to content

tui: prompt history is clobbered w/ multiple instances of opencode #19536

Closed as not planned

Description

@elijahmorg

Description

prompt-history.jsonl is overwritten by opencode when writing a new prompt to prompt history.

When you have multiple instances of opencode the prompt history will be overwritten by each opencode instances history store.

This leads to losing prompt history.

Plugins

none

OpenCode version

dev branch

Steps to reproduce

  1. open two instances of opencode tui
  2. in instance one send hello1
  3. in instance two send hello2
  4. look at prompt-history.jsonl - hello1 will not be present in jsonl.
  5. when you restart opencode you will lose prompt history

Screenshot and/or share link

No response

Operating System

MacOS

Terminal

Ghostty

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Mar 28, 2026
  2. github-actions commented on Mar 28, 2026

    @github-actions
    Contributor

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

    • client state clobbered w/ multiple instances of opencode #19436: Filed by the same author minutes earlier — covers the exact same root cause (client state being clobbered by multiple opencode instances), and explicitly calls out prompt-history.jsonl as one of the affected files alongside kv.json, frecency.jsonl, and models.json.

    This issue appears to be a narrower, more focused subset of #19436. Consider closing this one in favor of tracking it there, or clarifying whether this should remain a separate focused issue.

  3. elijahmorg commented on Mar 28, 2026

    @elijahmorg
    Author

    Demo of just prompt-history.jsonl clobbering

    prompt_history_bug_demo.mov
  4. elijahmorg commented on Apr 1, 2026

    @elijahmorg
    Author

    Hey @rekram1-node, I have a pretty good demonstration of this issue and a PR to fix it. Any chance you can take a look?

    I know y'all get a million issues and tons of slop, so I want to be respectful of your time. This is not slop.

  5. removed
    bugSomething isn't working
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on May 3, 2026
  6. github-actions commented on Jul 3, 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