You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A thread summary can leave older messages unsummarized above it #5531
After an agent summarized part of a long comment thread, the "Earlier discussion" block replaced only a middle stretch of it. Several older messages, starting just after the thread's first message, stayed in full above the summary. The thread then read: the first message, those older messages, the summary, then the newer messages.
A later summary hint on the same thread proposed a range that starts before the existing summary and runs past it.
I don't have a minimal repro of how the first range was chosen: it may have come from the hint or from the agent's own choice. Either way, nothing stopped a summary from leaving unsummarized older messages above it.
Expected
A summary of earlier discussion covers every message older than the ones it keeps in full, apart from the thread's first message if keeping that is deliberate. A hint shouldn't propose a range that leaves such a gap, or that overlaps an existing summary.
Setting
A page with one comment thread of about fifteen messages between the user and an agent. Some agent replies are ephemeral, and some carry a choice widget. The summary was made with leaf thread summarize.
I've opened #5583, which fixes how the hint picks its range. The admission side of this report is still open.
Cause. The hint split the thread's earlier discussion at every progress (ephemeral) message and suggested the longest resulting run. One progress update completed early in a thread was enough to move the hint past the messages before it, so a summary that followed it left them in full above it. That split was there so a hint wouldn't overlap the automatic progress folds. #3534 removed those folds, so it no longer protected anything. With #5583, a run passes over completed progress and ends only at pending progress or at a summary in force, and the hint takes the earliest qualifying run instead of the longest. Its regression tests fail on main and pass with the fix. CI and review are still pending.
Still open:
leaf thread summarize accepts any contiguous range, so a range the agent chose itself can still leave a gap above a summary. Refusing that at admission would change the contract. It also needs a decision on whether the thread's first message may stay outside a summary, so I've left it for you.
A hint that overlaps an existing summary shouldn't be possible: the hint is built only from messages no summary in force covers. I couldn't reproduce that part from the report. The event log of the affected page would show which summary events were in force when the hint was computed.
Activity
leaf-agent commentedon Nov 6, 2026
I've opened #5583, which fixes how the hint picks its range. The admission side of this report is still open.
Cause. The hint split the thread's earlier discussion at every progress (ephemeral) message and suggested the longest resulting run. One progress update completed early in a thread was enough to move the hint past the messages before it, so a summary that followed it left them in full above it. That split was there so a hint wouldn't overlap the automatic progress folds. #3534 removed those folds, so it no longer protected anything. With #5583, a run passes over completed progress and ends only at pending progress or at a summary in force, and the hint takes the earliest qualifying run instead of the longest. Its regression tests fail on
mainand pass with the fix. CI and review are still pending.Still open:
leaf thread summarizeaccepts any contiguous range, so a range the agent chose itself can still leave a gap above a summary. Refusing that at admission would change the contract. It also needs a decision on whether the thread's first message may stay outside a summary, so I've left it for you.fix: suggest the earliest thread summary range, folding completed pro…
Offer a thread summary hint that takes in the thread's earlier summar…
Let the summary fork choose what a thread's summary folds (#6401)
Leave the summary range, and what a fold reads, to the agent
Leave what a thread summary shows to the agent, and keep it to a few …
Name the code that chooses for the agent besides refusals, and where …