Repository navigation
fix(fork): one agent message in a row in the Chat + Replies main list - #151
Merged
Merged
Conversation
…t + Replies In Chat + Replies the agent may not send two messages in a row in the main list, but send_to_user accepts every new_sub_thread call. These cases fail on the current code: a second new message is accepted, and the tools' history read stops 120 messages back, before the main list's latest message. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The agent could send any number of new main-list messages in a row, and on desktop the hover Reply button under such a message was cut off. send_to_user now refuses a new main-list message while the agent's last one there has no user message after it, counting sends still running or not yet stored. User replies in sub-threads do not reopen the main list. The tools read history back to the main list's latest message, so a long sub-thread cannot hide it. The list clips each row, so the Reply button now sits inside its row: with a mouse its slot tops up the row's bottom padding to the button's height. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Other scenariosAll 64 scenario measurements match All 64 scenario measurements
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
1 task
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.
This pull request makes Chat + Replies refuse a second agent message in a row in the main list, and stops the desktop Reply button from being cut off.
改了什么行为
Behaviour change: yes, agents in Chat + Replies are refused a second new main-list message until the user writes in the main list; desktop users see the whole Reply button.
Why
Each sub-thread already took one answer per user message, but nothing checked new main-list messages, so an agent could post several in a row. The message list clips each row, so the Reply button, which hung below its row, lost its lower half.
Checks
New tests fail on the first commit and pass on the second. The repo's checks for changed files pass. In the web app, a live agent asked for three new messages got the first and a refusal for the second; on the old code all three went out. Desktop and phone screenshots show the button in full.
How to undo
Revert both commits. Nothing is stored.
Design notes
send_to_userwith noreply_to, a Claude call still running before the caller that the handler would accept as a new message, and, for providers whose calls do not name themselves, an accepted send held for 10 seconds under its own main-list key. Replaces, acks and replies do not count.MessagesTimeline.tsx; if that rule changes, the slot must follow.MessagesTimeline.tsx+1 −3, in the fork's existing Reply button line. All other changes are in fork files.