Parse the repo.
Codna scans files, symbols, imports, tests, and dependency edges. It builds the map from import patterns, without a model, so it costs zero tokens and sends no code anywhere.
codna triage . --json
Codna maps your entire codebase for zero tokens, then fixes the bug with only the evidence that matters.
Codna scans files, symbols, imports, tests, and dependency edges. It builds the map from import patterns, without a model, so it costs zero tokens and sends no code anywhere.
codna triage . --json
The graph identifies what can break if a function, file, package, or API changes. That lets Codna narrow the search space before the agent starts.
Codna hands the agent the exact files, failing tests, call paths, and recalled context it needs. It prints the raw-to-bundle size on every run.
The agent writes the patch. Codna reports root cause, confidence, blast radius and regression risk, and runs a risk gate before anything is applied. With --tests --apply it runs your tests in a sandbox and re-fixes until they pass. With --open-pr it opens the pull request for your review.
codna fix https://github.com/org/repo --issue "checkout race condition" --open-pr
01Under the hood
Architecture
Use your own key with Anthropic, OpenAI, Google Gemini, Groq, Mistral, OpenRouter or xAI, or the managed model allowance. The deterministic map stays the same.
Your model key, stored in your OS keychain. Your provider. Your bill.
Give Cursor and Claude five Codna tools as a local server.
Run Codna in any repo, CI job, or container. The GitHub Action runs the same commands.
Review every pull request. Turn issues and red checks into fix PRs.
Codna builds a dependency and blast-radius graph from the repository's import patterns, without a model and for zero tokens. The graph records which code affects which, so localization is not guesswork.
The slice of context Codna assembles before it calls the agent: the suspect files, call paths, the failing test, and recalled context. Codna prints the raw-to-bundle token size on every run, so you see how much the agent read.
Every fix passes a risk gate before it is applied or a pull request opens, and reports root cause, confidence, blast radius and regression risk. Run codna fix --tests --apply and Codna runs your tests in a sandbox and re-fixes until they pass, up to the iteration limit you set.
On 87 matched bug-fix cases against Cursor, Codna used 5× fewer tokens and ran 1.7× faster, at about $0.02 of model spend per verified fix on average.
The repository map comes from import patterns, so it is not tied to one language. On-device recall covers Python, JavaScript, TypeScript, Go, Rust, Java, C, C++, C#, PHP and Ruby. Your own test command runs whatever runner your repo uses.
Codna ships as a CLI, an MCP server for Cursor and Claude, a GitHub Action, and a GitHub App. Understanding runs on your machine. Only the evidence bundle or the diff reaches your model provider, with your key.