Repository navigation
Leave what a thread summary shows to the agent, and keep it to a few sentences - #6617
Merged
Merged
Conversation
leaf-agent
previously approved these changes
Nov 20, 2026
Admission no longer refuses a summary that leaves a message in full above it (`summary-gap`). That rule came from #5531: a summary folded a middle stretch and older messages stayed in full above it. Max asked on #6617 for summaries where the agent decides what shows, and the rule kept the agent from keeping an older question in full between two summaries, which the new guidance invites. The hint still suggests a range with no gap (`thread_context._gapless`, moved from `events.summary_range`, its only caller now), and threads.md still asks for one summary over earlier ones. A summary that ends inside an earlier one now uncovers that one's tail rather than being refused. A fold seen whole now reads the messages it folds whatever it says of them, a bare fold or a label included, since the agent folded them for the user to read the fold instead. Before, only summary prose did.
The fork's prompt still told it Leaf takes no range that leaves a message in full above a summary, which admission no longer refuses. A panel test also claimed Next unread opens a fold the view had just shown, which now reads the replies it folds; Codex found both.
leaf-agent
previously approved these changes
Nov 20, 2026
leaf-agent
left a comment
Collaborator
There was a problem hiding this comment.
The description becomes main's commit message on merge, and a320c1f moved two of its claims:
- It says a summary's prose shown whole reads the messages it folds and "a label-only fold reads nothing". Now any fold seen whole reads them, including a bare fold or one with only a label (
transcript.jsobserves.lf-summary-checkpoint). - It doesn't say that admission no longer refuses a range that leaves a message in full above a summary (
summary-gapis gone, along withevents.summary_range). Only the hint still widens to keep that rule (thread_context._gapless). It also doesn't say that a summary ending inside an earlier one now uncovers that summary's tail instead of being refused.
Could you update the body to match?
leaf-agent
previously approved these changes
Nov 20, 2026
main's #6569 dropped the panel row's On Me mark (ON_ME_MARK); the leaf opens On Me now, which leaf_dev.browser.open_on_me drives.
leaf-agent
previously approved these changes
Nov 20, 2026
# Conflicts: # src/leaf/events.md
leaf-agent
approved these changes
Nov 20, 2026
max-sixty
added a commit
that referenced
this pull request
Nov 21, 2026
…a survey finds it (#6630) The refusal survey of 16 November listed `findings.py`'s codes and their hits in agent transcripts, so it missed the two summary mechanisms #6617 later removed that refused nothing: served state's `protected`, which forced a fold open, and the rule that only a summary's prose read the messages it folded. Neither prints a finding or leaves a trace in a transcript. The third, `summary-gap`, it found and kept as Max's: #5531, an issue an agent wrote in his name, described the outcome, and an agent's sweep (#6049) made that a refusal. This adds "Code that chooses for the agent" to root `AGENTS.md`'s "Regular maintenance": the shapes such code takes besides a refusal, each judged by "Leaf's role" whoever asked for it, and where the ones that print nothing show, in what the page draws set against what the agent's write declared. "What it buys" now credits an outcome the maintainer asked for rather than any request. Worth weighing: an earlier version also added a `/developing-leaf` section walking `findings.py` and the served-state schema; Max asked for it to come out. In fresh sessions running his 16 November request on the tree before #6617, that walk found `protected` once in two runs, against none in five without it, so the bullet alone may leave surveys missing such code. Max asked for this investigation and for the skill section's removal; nobody else has read it. No tests cover maintainer guidance; pre-commit passes. > _This was written by Claude Code on behalf of max-sixty_ --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
A thread summary now replaces the messages it folds, and Leaf's code leaves what a summary shows to the agent. Before, Leaf's served state marked folded messages that held the user's open items or the agent's owed turn as
protected, and the browser forced such a summary open under "Messages kept open · current work". A reply folded with its correction, both waiting on the user, then showed the answer three times, and the agent's summary ran 65% of the two messages' length. This removesprotectedand the forced fold, and admission's refusal of a range that leaves an older message in full above a summary (summary-gap, from #5531), so the agent can keep an older question in full; the delivery hint still suggests a range with no gap.threads.mdgives the agent the goal (the user reads a summary in place of its messages, so it is much shorter: "a few sentences, usually under sixty words") and the context (a folded ask stays On Me and opens the fold from there). The summary fork quotes the same paragraph.Two follow-ons the removal exposed: On Me's Show focused a message hidden in a closed fold, so
arrivenow reveals what it focuses; and folded unread messages kept the card offering Next unread, so a fold seen whole now reads the messages it folds, whatever it says of them.Evals,
main's guidance against this branch's final code, three runs each: summary fork over long replies 0/3 → 3/3, length 0.53–0.69 → 0.15–0.17 of the range; over one-line messages 0/3 → 3/3; agent folding its correction 0/3 → 3/3, 182–212 → 59–70 words; guard cases unchanged (fork 9/9, agent 12/12).Max asked for this on a Leaf page, and for the range and read changes in review there; Codex reviewed each round. Tests: focused model, runtime and browser tests, including new ones for On Me into a fold and reading through a fold.