You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CLI prompt history is global, not project-scoped #25811
The CLI TUI prompt history (arrow-up/down navigation in the input) is stored in a single global file rather than being scoped per project. This means pressing arrow-up in one project shows messages typed in completely different projects.
Steps to reproduce
Open opencode CLI in project A, type and send several messages
Close opencode
Open opencode CLI in project B
Press arrow-up in the input
Expected: See messages previously typed in project B Actual: See messages from project A (and all other projects) mixed together
Root cause
packages/opencode/src/cli/cmd/tui/component/prompt/history.tsx:32 stores history at a global path:
Global.Path.state resolves to the OS XDG state directory (~/.local/state/opencode/) which is shared across all projects. The file has no project identifier in its path, and the load/append/move functions have no project filtering.
This issue might be a duplicate of existing issues. Please check:
All prompt inputs share the same history #15187: "All prompt inputs share the same history" — describes the same problem of prompt history being shared globally rather than scoped per-project/session
Activity
github-actions commentedon May 5, 2026
This issue might be a duplicate of existing issues. Please check:
prompt-history.jsonlfile causing data loss with multiple instancesPlease review those issues and consider adding your findings there if they cover the same root cause.
github-actions commentedon Jul 5, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.