Repository navigation
fix(tui): prevent startup sends to the wrong session - #126046
Merged
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
steipete
marked this pull request as ready for review
August 18, 2026 22:05
Contributor
Author
|
Land-ready verification for exact head
Production LOC is +3/-12 (net -9); tests and test support are +549/-13. ClawSweeper's exact-head worker run completed successfully, but its public comment remains the started placeholder, so no |
Contributor
Author
|
Merged via squash.
|
This was referenced Aug 19, 2026
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Aug 20, 2026
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.
What Problem This Solves
Fixes an issue where users launching the TUI without
--sessioncould immediately press Enter and silently send to the defaultmainsession before the remembered session finished restoring. The viewport would then switch to the remembered session, hiding that the message and resulting transcript were stored elsewhere.Why This Change Was Made
Connection readiness now remains owned by the existing connection generation until remembered-session selection and history loading settle. Input during that window is visibly rejected and remains editable; no second readiness flag or message queue is introduced.
User Impact
No-session TUI launches and reconnects cannot send against an unstable session identity. Explicit
--session,/session,/new, and/resetbehavior is unchanged; failed remembered lookup still falls back tomain.Evidence
Pre-fix real PTY/Gateway oracle: delayed
sessions.listaccepted the marker asagent:tui-pty-validation:main, then rendered the remembered session header; isolated SQLite contained the marker undermainonly.Post-fix real PTY/Gateway oracle:
Validated:
node scripts/run-vitest.mjs run --config test/vitest/vitest.tui-pty.config.ts src/tui/tui-session-identity-pty.e2e.test.ts(7/7)node scripts/check-changed.mjspnpm buildProduction LOC: +3/-12 (net -9). Tests and test support: +549/-13.