Autonomous code repair starts with understanding.
An agent that reads your repo through the model spends most of its tokens finding the bug. Codna maps the repository first, without a model, and hands the agent an evidence bundle scoped to the issue. It prints the raw-to-bundle size on every run.
The result is a fix that explains itself: root cause, confidence, blast radius and regression risk, gated by a risk check before anything is applied. Run it with --tests --apply and Codna re-runs your tests until they pass.
Core pattern
- Map the repo for zero model tokens.
- Identify suspect files and call paths.
- Pack an evidence bundle scoped to the issue.
- Generate a patch and report root cause, confidence and risk.
- Gate it, test it, and open a pull request you review.