▶ Session 2 — the agent has forgotten everything, and proposes the SAME fix as before…
⛔ BLOCKED before it could waste another test cycle:
RegressionLedger: you already tried the same fix to src/auth.js 2 hours ago.
It failed with: AssertionError: expected 200, got 401
Re-applying it will reproduce the same failure. Change strategy instead.
Run rl show src/auth.js to see the full attempt history.
Why
Agents lose their memory when the context window fills up — then confidently re-apply a patch they already tried two prompts (or two sessions) ago. Same wrong fix, same red test, credits gone. In-session loop detectors don't survive the reset; memory layers only advise, and the model ignores advice. RegressionLedger remembers what was tried and what it broke, and enforces it.
How it works
🧬 FingerprintEvery edit becomes a normalized token stream — cosmetic diffs collide, true ≠ false doesn't. A second, structure-only channel catches renamed re-applications.
🔗 Link outcomesThe next test/build run (11 toolchains: jest, vitest, pytest, go, cargo, tsc, eslint…) marks those edits pass or fail, capturing the error.
💾 RememberA local JSON ledger survives restarts and context compaction. No network, no keys, no database.
⛔ BlockRe-applying a failed fix is denied at PreToolUse with the original error attached. Warn-only mode + minFailures for cautious rollouts.
Things no other tool does
🧠 Session briefingOn every session start — including right after compaction wipes the agent's memory — a SessionStart hook injects "what already failed here". Dead ends are blocked before they're re-conceived.
🌀 Thrash escalation3+ different fixes dying on one error = the diagnosis is wrong, not the patches. The hook stops the loop and demands root-cause hypotheses.
🤝 Herd immunityrl export / rl import: your agent inherits the dead ends a teammate's agent already paid for — attributed and auditable.
📊 ProvableDeterministic benchmark: 120/120 disguised repeats caught, 0/190 false blocks. Run npm run bench yourself.
Install
As a Claude Code plugin (hooks activate automatically):
/plugin marketplace add anlor1002-alt/regressionledger
/plugin install regressionledger@anlor1002-plugins
Or wire it manually into a project:
npx regressionledger init