fix: exit with error when --continue finds no sessions#26014
Open
Kushalk0677 wants to merge 1 commit intoanomalyco:devfrom
Open
fix: exit with error when --continue finds no sessions#26014Kushalk0677 wants to merge 1 commit intoanomalyco:devfrom
Kushalk0677 wants to merge 1 commit intoanomalyco:devfrom
Conversation
Contributor
|
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
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
Author
|
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. |
Collaborator
|
Appreciate the PR but opencode already behaves as expected no? |
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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.