Repository navigation
fix(tui): prevent stale session actions from mutating replacement conversations - #129681
Merged
steipete merged 1 commit intoAug 26, 2026
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 25, 2026 23:45
steipete
deleted the
codex/tui-preserve-session-incarnations-and-output
branch
August 26, 2026 00:06
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Aug 26, 2026
This was referenced Aug 26, 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 terminal users resetting a session could see an older in-flight abort, setting change, or reset mutate the replacement conversation even though it kept the same session key. This could incorrectly expose the replacement session's tool output through a delayed verbose setting, erase its usage preferences or pending prompt, resurrect an obsolete session, and display stale abort errors. It also fixes terminal help advertising thinking levels unsupported by the selected session and indented tool output being misinterpreted as Markdown headings, quotes, or lists.
Why This Change Was Made
Treat a session's selected owner, lifecycle generation, and initially-bound session ID as one authoritative incarnation before applying delayed operations; reuse the same ownership rule already required for chat sends. Keep slash-command completions and help on the same session-provided thinking-level resolver, and preserve tool-result whitespace until the real Markdown renderer interprets it.
User Impact
Session resets no longer inherit old abort notices, stale model/thinking/verbosity/usage changes, removed pending prompts, or obsolete reset results. Terminal help now matches the levels the active model session actually accepts, while literal indented tool output remains literal for both streaming and completed tool cards.
Evidence
runTui()terminal proof: the fake-backend PTY now asserts/helpshows only the active session's supportedmaxthinking level and verifies literal#/>tool output remains an indented code block in both streaming and final terminal frames.