Skip to content

fix(cognition): steps ledger heads-only — receipts were paid twice per window (#324/#211) - #2172

Merged
joelteply merged 1 commit into
canaryfrom
fix/ledger-heads-only-dedup
Aug 8, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fix/ledger-heads-only-dedup

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

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

…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
@joelteply
joelteply merged commit 8a552d5 into canary Aug 8, 2026
@joelteply
joelteply deleted the fix/ledger-heads-only-dedup branch August 8, 2026 04:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant