anomalyco / anomalyco/opencode
Bug: TUI auto-resumes last session instead of starting fresh
Open
@kommander is already working on this.
Since Sep 8, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
The TUI auto-resumes the previous session when launching opencode in a directory with an existing session, without any prompt. Issue #45622 claims "The CLI/TUI already supports this distinction — opencode starts fresh by default and opencode -c resumes," but this is not the behavior I see.
Steps to reproduce
- Launch
opencodein a directory - Use it for a while, then exit
- Launch
opencodeagain in the same directory - Previous session is silently resumed with no prompt
Expected behavior
A bare opencode launch should start a fresh session, with an option like opencode -c to resume. Alternatively, if a session exists, show an interactive picker.
Environment
- OpenCode CLI TUI v1.18.29
- macOS 27.0 arm64
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.