Repository navigation
fix(cognition): steps ledger heads-only — receipts were paid twice per window (#324/#211) - #2172
Merged
Merged
Conversation
…paid twice per window (#324/#211) The [steps taken this session] fact mapped each Receipt entry's FULL text — args and result body — while the working-memory TRAILING channel renders the same entries again nearest generation. Byte-level duplication of every receipt on every prompt; on a 16k lane that is the single largest avoidable window cost. The ledger's job is the act HISTORY as a fact, so it now lists each step's head line ([action #n] name(args)) and nothing more; the full trace lives once, in the trailing channel. Ledger tests green (20/20 incl. steps_ledger_renders_receipts_and_explicit_zero_case, steps_ledger_is_honest_in_all_three_states — all three honesty states assert on the header/void/aged-out lines, which are unchanged). Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
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.
The steps-ledger fact carried every receipt's full text (args + result body) while the WM trailing channel renders the same entries again — byte-level duplication on every prompt. Ledger becomes a table of contents (head lines); the full trace lives once in the trailing channel. Ledger tests 20/20.
🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo