Skip to content

fix(tui): avoid invalid dummy session id on continue - #48421

Closed
pcgeek86 wants to merge 1 commit into
anomalyco:devfrom
pcgeek86:fix-continue-session
Closed

pcgeek86 wants to merge 1 commit into
anomalyco:devfrom
pcgeek86:fix-continue-session

Conversation

@pcgeek86

@pcgeek86 pcgeek86 commented Sep 11, 2026

Copy link
Copy Markdown

Summary

Fixes an error where running opencode --continue fails backend schema validation:

Error: Expected a string starting with "ses", got "dummy"

Cause

When --continue was passed, RouteProvider in packages/tui/src/app.tsx initialized initialRoute with { type: "session", sessionID: "dummy" }. Mounting the session view immediately invoked sdk.client.session.get({ sessionID: "dummy" }), which failed schema validation because SessionID requires strings to start with "ses".

Solution

  • Remove the hardcoded "dummy" session ID from initialRoute so that --continue waits for sync.data.session to resolve the latest valid session before navigating.
  • Pass input.args.sessionID to initialRoute when --session is provided without --fork.
  • Show a warning toast when --continue is used in a repository without any existing sessions.
  • Update tests in packages/tui/test/app-lifecycle.test.tsx to verify no requests are made to "dummy" session IDs.

Fixes #29748

@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Sep 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Potential Duplicate Found

PR #47555: fix(tui): stop fetching placeholder session id on --continue
#47555

This PR appears to be directly related to the current PR #48421. Both address issues with the --continue flag and placeholder/dummy session IDs being fetched or used incorrectly. PR #47555 specifically mentions "stop fetching placeholder session id on --continue," which seems to be addressing the same root cause of invalid dummy session IDs.

You should check if PR #47555 has already been merged or if it needs to be reconciled with the current PR #48421.

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

Feel free to open a new pull request that follows our guidelines.

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Sep 11, 2026
@github-actions github-actions Bot closed this Sep 11, 2026
@pcgeek86

Copy link
Copy Markdown
Author

This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.
Feel free to open a new pull request that follows our guidelines.

Ummm, ok. I literally did exactly what you asked.

image image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error: Unexpected server error. Check server logs for details.

1 participant