Dev ships Canon CLI to fix AI coding agents rehashing rejected approaches
letsrediit · reddit · 2026-08-15
A developer released Canon, a local-first CLI tool designed to prevent AI coding agents (like Claude Code and Cursor) from repeatedly proposing previously rejected approaches or inventing stale conventions.
The Problem
Agents often lose context between sessions, re-proposing rejected PRs, asking settled questions, or treating old comments as current truth. Maintaining static ADRs manually is costly and prone to staleness.
How Canon Works
- Local & Private: Uses SQLite with no cloud account required. GitHub integration is read-only for PR mining.
- Auto-Injection: Hooks into Claude Code (SessionStart) and Cursor (always-apply rule) to inject only active decisions automatically.
- Decision Tracking: Suggests decisions with provenance (e.g., PR #184) for approval. Replaces rather than deletes old decisions to ensure context accuracy.
- Fail-Safe: Prefers stating "no confirmed decision" over guessing when confidence is low.
Installation
bash
pip install git+https://github.com/Adarshk18/Canon.git
canon init
canon suggest
Currently supports Claude Code and Cursor auto-injection; ChatGPT requires manual attachment of .canon/injection.md.
Related event: Developer Open-Sources Canon, Giving AI Coding Agents a Decision Memory(2 posts)→
More from coding & agent
- Coding agents keep opening 3 stacked PRs per chat, and merging them is a nightmare — holdenmatt · 2026-10-16
- Google-led paper uses sequential auctions to organize decentralized LLM agent workflows — _onionesque · 2026-10-16
- Since OpenAI's math release, GitHub contributors keep driving down the integer-multiplication kappa — xennygrimmato_ · 2026-10-16
- Pattern MCP makes coding agents check existing components before writing new code — DonR954 · 2026-10-16
- Zero-keyframe procedural spider walks walls and ceilings using pure raycasts — yshan2u · 2026-10-16
- OpenCode v1.19.2 keeps 1.x installs off the 2.x update path — opencode-agent[bot] · 2026-10-16