Repository navigation
app: say an agent's live line as its turn moves to each call - #2068
Merged
Merged
Conversation
The line (the call the turn is on) was set on each new call but never said, so a window kept a stale line for the whole turn. Each new call is now said with agent.changed, at most once a second per agent, the newest always last; a line waiting when the turn ends is dropped.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
agent.changed goes straight out while the turn's events go through their box, so where it lands among them is not part of the order. The first call's live line is asserted on its own. Co-Authored-By: Claude Opus 5.5 <[email protected]>
santoshkumarradha
marked this pull request as ready for review
November 2, 2026 17:37
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
An agent's
line(the call its running turn is on) is now said again withagent.changedas the turn moves to each call. Before,a.stepchanged on everyEventToolBeginbut nothing emitted it, so a window kept whatever line the last road said (usually none) for the whole turn.How
cmd/codeaf/appliveline.go:stepMovedsets the step and says the agent at most once perappLineEvery(1 s) per agent. A newer line inside the interval waits for one trailing flush, so the newest line is always the last one said.lineSettledLockeddrops a pending flush when the turn ends, because the turn's own end already says the agent with no line.cmd/codeaf/app.go: the tool-begin case callsstepMoved, and the turn end callslineSettledLocked. There is one new field (lineSays).tui3.ToolTitlethe call'sturn.toolrow carries. It reports only what the agent did, never a guess at intent. It does not depend on any tool's name.Tests
TestAppLiveLineMovesWithTheTurnsCalls: a scripted turn's call reachesagent.changedasline, with stateworking.TestAppLiveLineIsRateLimitedAndEndsOnTheNewest: with a fake clock, the first line is said at once, lines in between are never said, the last is said after the interval, a call after the interval is said at once, and a line pending at turn end is dropped.Focused tests pass.
TestAppLiveLineMovesWithTheTurnsCallsfails without the change: noagent.changedcarries the line.The desk reads the line for the canvas manager's own live line.