Map the modules
Packages, imports, sealed hierarchies, coroutine call chains, and blast radius across Gradle modules — resolved deterministically, for zero LLM tokens.
Coroutines, extension functions, and sealed-class hierarchies make Kotlin expressive to write and hard for an agent to trace. Codna builds the dependency graph deterministically, so an AI Kotlin bug fix starts from facts about your code, not guesses.
The problem
A failing test in Kotlin often points nowhere near its cause. A suspended coroutine can swallow an exception on a different dispatcher, an extension function can be resolved from an import you forgot was there, and a platform type slipping past null-safety surfaces as an NPE three layers down. Add Gradle's multi-module builds and Kotlin/Java interop, and the real defect hides behind generated code and delegated properties. Engineers lose hours reading across modules and re-running slow Gradle builds just to find the one function that matters.
How Codna fixes it
Packages, imports, sealed hierarchies, coroutine call chains, and blast radius across Gradle modules — resolved deterministically, for zero LLM tokens.
The agent gets the failing test, the call chain, and the suspect functions in roughly 600 tokens — about 162x less context than reading the whole repo.
Codna re-runs your JUnit, Kotest, or Gradle suite; the patch ships only when your own tests pass.
codna fix . --issue "fetchUser() returns null after coroutine refactor"
What you get
Codna resolves your Kotlin module graph — imports, coroutines, interop with Java — in milliseconds with no embeddings and no LLM tokens, so the agent never burns context just reading code.
Instead of feeding 100,000+ tokens of source to a model, Codna hands the agent a focused bundle of about 600 tokens — a measured 162x reduction that keeps the fix grounded.
No patch lands until your existing Gradle, JUnit, or Kotest suite passes. The failing test is the oracle, so a green build is the proof — at about $0.04 per verified fix.
The proof
Codna maps your repo's dependency and blast-radius graph deterministically, hands the agent a ~600-token evidence bundle with the failing test and call chain, then verifies the patch against your own test suite before it lands.
It is a full AI coding agent for debugging, not a completion model. Codna traces the actual cause across coroutines and modules, proposes a fix, and proves it with a passing test rather than suggesting plausible-looking lines.
Yes. Codna verifies fixes against whatever runner your project already uses — JUnit 5, Kotest, or a Gradle test task — so the verification matches your CI.
Yes. The deterministic graph follows suspend functions, dispatchers, platform types, and Kotlin/Java boundaries, so the agent fixes the root cause instead of a symptom.
Yes. Codna ships as a CLI, an MCP server for Cursor and Claude, and a native GitHub App, so it works in your terminal, your editor, or directly on pull requests.
Yes. You can self-host Codna with your own keys (BYOK), egress is fail-closed, and your code is never used for training.
Related