anomalyco / anomalyco/opencode
tui: session becomes stale after restarting opencode
Open
@simonklee is already working on this.
Since Jul 25, 2026.
2.0
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Summary
Restarting opencode leaves the previously active session stale. Continuing requires opening a
new opencode instance, running /session, and manually reattaching to the session.
Environment
- opencode version:
opencode2 v0.0.0-next-16197 - OS: Darwin 25.4.0 arm64
- Terminal: tmux (
TERM=tmux-256color,COLORTERM=truecolor) - Shell:
/bin/zsh - Install/channel: next/beta
- Active plugins: Unavailable: omitted at reporter request
Reproduction
- Open opencode and start or resume a session.
- Restart opencode.
- Attempt to continue using the previously active session.
- Observe that the session is stale.
- Open a new opencode instance, run
/session, and reattach to the original session.
Expected Behavior
After restarting, opencode should restore or reconnect to the active session automatically and
allow it to continue normally.
Actual Behavior
The session becomes stale after restart. The only known workaround is to open a new opencode
instance, run /session, and manually reattach to the original session.
Additional Context
- Workaround: start a new opencode instance and reattach through
/session. - No error output or logs were captured.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.