anomalyco / anomalyco/opencode

Bug: TUI auto-resumes last session instead of starting fresh

Open
#47,892 2 comments 0 reactions 1 assignee View on GitHub

@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

  1. Launch opencode in a directory
  2. Use it for a while, then exit
  3. Launch opencode again in the same directory
  4. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.