fix: exit with error when --continue finds no sessions#26014
fix: exit with error when --continue finds no sessions#26014Kushalk0677 wants to merge 1 commit intoanomalyco:devfrom
Conversation
|
The following comment was made by an LLM, it may be inaccurate: I found one potential duplicate: Related PR:
This PR appears related because it also deals with the |
…ering TUI with invalid dummy sessionID
9786776 to
30e570a
Compare
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
|
Hi @rekram1-node, this fixes the --continue issue where the TUI crashes with an invalid sessionID when there are no prior sessions. It validates before the TUI starts and exits cleanly. |
|
Appreciate the PR but opencode already behaves as expected no? |
|
@rekram1-node its for when a person enters through the terminal and then tries to load a chat. |

When starting opencode on a project with no sessions, using
--continue/-c errors with an invalid dummy sessionID and leaves the TUI in a broken state.Issue for this PR
Closes #25989
Type of change
What does this PR do?
When
--continueis used, the session list is now checked before the TUI starts. If no root sessions exist, it exits with a clear error message instead of entering the TUI with an invalid dummy sessionID that fails validation.How did you verify your code works?
validate-session.tschecks for root sessions when--continueis passedScreenshots / recordings
Not a UI change.
Checklist
If you do not follow this template your PR will be automatically rejected.