Repository navigation
agent-core: compaction summary candidates (head-tail, bridge, state-sections, short, carry-all, validate), behind --compaction-candidates - #240
Closed
jaredLunde wants to merge 5 commits into
Closed
jaredLunde wants to merge 5 commits into
jaredLunde wants to merge 5 commits into
Conversation
…ehind head-tail A re-render cuts every tool result to its first 2,000 characters, and test runners print their tally last: 66% of the eval's long test results had it only after character 2,000. Under the `head-tail` compaction candidate a long result keeps its first 500 and last 1,500 characters, plus every test-tally or error line of the elided middle (at most 30). Off by default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JimHGjsfk2Ktm5GxyZJKKk
…n count, behind bridge Nothing told the model how the checkpoint relates to the verbatim messages after it, and the "Compacted from N tokens" line it did see is metadata only an export reads. Under the `bridge` compaction candidate the summary message opens with "Checkpoint of earlier work. Messages after it are newer and win where they differ. Work listed as Done is on disk: don't redo or re-verify it unless something newer contradicts it." instead. The count rides the provenance (`CompactionProvenance::tokens_before`), which the session store prefers to parsing the line; `previous_summary` and the export strip the bridge so it never stacks. Off by default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JimHGjsfk2Ktm5GxyZJKKk
…nd a short variant, behind state-sections and short Two changes to the summary format, each its own candidate, on the shipped template (the cached instruction under either wire's framing and the re-render alike, via shape_default_format) and on the state template. `state-sections` adds `## Tests & Errors (latest)` (the last test command, tally, failing IDs and current errors, verbatim) and `## Failed approaches / don't retry` ahead of Key Decisions, and turns Next Steps into one Next Step that must follow from the state, "Verify and finish" allowed: only 55% of eval summaries mention a test tally, 20% of compactions re-fail the same command within 30 calls, and summarized agents often fail to stop. `short` sets a ~700-word target with per-section caps: median length grew 771 -> 2,167 words by round five, and the evidence on length disagrees. Off, the shipped text is byte for byte unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JimHGjsfk2Ktm5GxyZJKKk
The request carry keeps the first and the latest three user messages at 4,000 characters each, dropping whatever the user said in between. Under the `carry-all` compaction candidate it keeps every genuine user message, each up to 8,000 characters and together up to ~8K tokens; over budget the first is kept and the rest fill from the most recent backwards, as Codex does. Summaries keep ~17% of user constraints against 93–99.7% when the user's words are re-appended verbatim. Off by default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JimHGjsfk2Ktm5GxyZJKKk
…ep to the summary, behind validate Only 55% of eval summaries mention a test tally and 34–40% kept the "don't edit tests" constraint. Under the `validate` compaction candidate, before the carry is appended, the summary gets what it lacks appended deterministically, never rewritten: the latest test tally and its command (when the kept suffix shows none), the user's constraint lines from the request carry, and a next step when it has none. The zero-cost version of the judge-and-repair loops that gain 2.6–8.8 points in the literature. Off by default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JimHGjsfk2Ktm5GxyZJKKk
Contributor
Author
|
Closing: no candidate met its ship rule in the probe eval (bridge, short and validate dropped; sections, head-tail and carry-all inconclusive or untested). Not landing dead flags. |
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.
Six compaction-summary candidates from the summary research, each its own commit and its own
--compaction-candidatesname. All off by default; with none named, every request, summary and persisted session is byte for byte what main produces.head-tailbridgeCompactionProvenance::tokens_before, which the session store prefers;previous_summaryand the export strip the bridge, so it never stacks.state-sections## Tests & Errors (latest)and## Failed approaches / don't retrybefore Key Decisions, and turns Next Steps into one## Next Stepthat must follow from the state ("Verify and finish" allowed). On the shipped template (cached instruction under either wire's framing, and the re-render) viashape_default_format, and on the state template.shortcarry-all<user-requests>(each ≤ 8,000 chars, ≤ 32,000 in all; over budget the first plus the most recent), instead of the first and latest three.validateIncludes an end-to-end
compacttest forbridge+validate, plus unit tests per candidate.Eval results (probe-based replay + continuation) are reported separately; nothing here changes defaults.
🤖 Generated with Claude Code
https://claude.ai/code/session_01JimHGjsfk2Ktm5GxyZJKKk