Repository navigation
fix(tui): try again after /clear takes back the right question or just re-asks - #1228
Closed
sosidudku1 wants to merge 4 commits into
Closed
sosidudku1 wants to merge 4 commits into
sosidudku1 wants to merge 4 commits into
Conversation
After a cleared transcript the client counts the question's position from what it shows, so a failed "continue" the agent never stored could line up with an earlier "continue" and remove its real answer. expectUnanswered: true says the client saw no answer, and a stored reply then refuses with turn_mismatch (ATO-1420).
…n back After /clear the screen no longer shows the earlier questions the session still holds, so try again handed the rollback a position counted from the screen. A failed "continue" then lined up with an earlier "continue" and its real answer was removed. The reducer now keeps how many questions a clear hid, try again adds them to the position, and a question shown without an answer is sent with expectUnanswered (ATO-1420).
Collaborator
Author
sheepdogs
pushed a commit
to sheepdogs/atomic-agent
that referenced
this pull request
Nov 12, 2026
sheepdogs
pushed a commit
to sheepdogs/atomic-agent
that referenced
this pull request
Nov 12, 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.
Linear: ATO-1420 (item 1, terminal part). Stacked on #1164.
After
/clearthe terminal's Try again counted questions from what's on screen, so the position sent to the agent was off. Now:clearedQuestions, reset on session switch) and adds them to the position;expectUnanswered: truewhen there's no reply under the question on screen, so the agent refuses instead of taking back a real answer, and the TUI re-asks.The first commit is a cherry-pick of the agent-side change (the PR on #1162) so this branch builds on its own; it drops out on rebase once #1162 has it.
Tests:
src/tui/chat/chat-try-again-button.test.tsx(runs the real rollback planner: after a clear a failed "continue" keeps the real answer and resends; the last answered question after a clear is still taken back),src/tui/reduce-ui-actions.test.ts.Checked on the second Mac on 12.11.2026 in the combined run with the other open PRs: build, lint, test types, vitest, desktop unit tests, desktop smoke and live smoke all green.