Announcement · KodeGraph · June 2026

KodeGraph makes Kaptain faster at understanding and changing code

Kaptain includes KodeGraph, a model-agnostic code-context layer that helps agents reach the right working set with fewer wasted model tokens. In the clean June 25 comparison, Kaptain + KodeGraph used 78.1% fewer total Codex tokens than Direct Codex while preserving 1.000 gold-file recall.

Why this matters

When an AI assistant works on a real codebase, the expensive part is not one lookup. It is the loop: search, miss, ask again, open more files, then finally get enough context to act. Every extra loop spends tokens, time, and local compute.

Kaptain built KodeGraph into its workflow so models are less likely to token-max while users build real projects. It enriches retrieval before the model reasons, so Kaptain can send fewer wasted tokens and more relevant context into each code workflow.

The primary benchmark now shown here is the clean June 25 comparison: same exact lookup, same 1.000 gold-file recall, lower full Codex token spend with Kaptain + KodeGraph.

Additional KodeGraph runs are used as supporting evidence for retrieval quality and workflow behavior, but the cost claim is anchored to full-session Codex tokens rather than a single isolated payload.

The takeaway: KodeGraph gives Kaptain a built-in cost advantage: stronger workflow-shaped retrieval, fewer avoidable model tokens, and a code-context layer designed to keep project-building workflows from burning through model context as repositories scale.

The verdict at a glance

78.1%

Fewer Codex tokens

June 25 exact lookup: 11,438 total Codex tokens with Kaptain + KodeGraph versus 52,241 for Direct Codex.

1.000

Gold-file recall

Both runs reached the gold working set, keeping the comparison focused on cost, speed, and workflow efficiency.

0

Codex tool calls

Kaptain supplied the needed context up front in the clean benchmark row, versus 2 tool calls for Direct Codex.

5.5s

Wall time

Kaptain + KodeGraph completed the exact lookup in 5.5 seconds versus 13.1 seconds for Direct Codex.

Retrieval quality

"Quality" here means: when you ask the engine something, does it return the right answer? A score of 1.0 is perfect, so higher is better. KodeGraph is teal; the standard code-graph MCP is slate.

Horizontal bar chart comparing KodeGraph and a standard code-graph MCP across retrieval-quality metrics. Higher scores are better. KodeGraph leads callers, impact, explore, and context; the standard MCP leads concept search.
What it shows: retrieval quality across 52 gold-standard queries. KodeGraph leads callers F1, impact recall, explore file-recall, and context retrieval. The standard MCP leads concept search in this run.

Faster workflows come from better context

This is the question that matters most: if Kaptain is going to help with a codebase, it has to retrieve the right evidence. These tests ask whether the engine can identify callers, estimate change impact, and gather the files needed for a task.

"Who calls this?"
callers F1
0.912
0.877
"What breaks if I
change this?"
impact caller-recall
0.900
0.833
"Show me the code
for this task"
context file-recall
0.750
n/a
KodeGraph Standard code-graph MCP

On "who calls this" and change-impact, KodeGraph is ahead in this run. On gathering code for a task, KodeGraph's context and explore paths give the agent a strong working set before the model spends more turns. That is what improves file work: fewer blind searches before the model can read, modify, and verify the relevant code.

Token cost: Kaptain reduces full Codex spend

Tokens are operating cost. They affect user spend, latency, and how far a workflow can scale before it becomes too expensive. The clean June 25 benchmark compares Direct Codex against Kaptain + KodeGraph on the same exact lookup with the same 1.000 gold-file recall.

MetricDirect CodexKaptain + KodeGraphResult
Gold-file recall1.0001.000Same answer quality
Total Codex tokens52,24111,43878.1% lower
Uncached input tokens19,4449,37710,067 fewer
Output tokens413141272 fewer
Codex tool calls20Kaptain supplied context up front
Wall time13.1s5.5sFaster completion
Lower full-session spend The main evidence is total Codex tokens, not one isolated payload.
Same recall Both paths reached 1.000 gold-file recall, so the reduction is not trading away the target working set.
Fewer tool loops Kaptain prepared context before Codex needed extra tool calls, reducing avoidable model-side work.
The cost strategy. Kaptain is built to reduce model waste by preparing better context and controlling workflow execution before premium reasoning expands.

The token data separates payload size from payload value. Kaptain's advantage is workflow-level: fewer avoidable model tokens, fewer tool loops, and a cleaner route to the working set.

The cost advantage in the workflow

Kaptain is local-first, but the bigger user-facing cost is the repeated retrieval loop: every miss can trigger another model turn and another payload. KodeGraph reduces that waste by shaping context around the task before the model starts coding.

Four-panel chart showing KodeGraph's token-to-gold, explore recall, callers F1, and impact recall wins over a generic code-graph MCP path.
What it shows: same repository, same workload. KodeGraph wins the workflow metrics that reduce retrieval waste: task-level tokens-to-gold, explore recall, callers F1, and impact recall.

Why this makes Kaptain stronger

Beyond the head-to-head metrics, KodeGraph is designed as a model-agnostic context layer. It strengthens Kaptain's own agent workflows and can enrich other connected AI systems with better retrieval context. That gives Kaptain an advantage over generic code-graph tooling where code work actually starts: selecting the right project context before a model spends tokens reasoning over it.

CapabilityKodeGraphStandard MCP
Symbol search, callers, callees, impact, explore
Dedicated context tool in MCP surface
Workflow-aware context retrieval
Active-file awareness across a session
Compact responses for small / local models
Broad-folder awareness without runaway deep indexing
3D project visualization (God's Eye) + REST APICLI only
Runs with zero external runtimein-processneeds Node
Model-agnostic context layer
Can enrich other connected AI workflowspartial

What Kaptain users get

KodeGraph matters because it is a native Kaptain capability. That changes the user experience in four practical ways:

What this means for Kaptain users: KodeGraph brings codebase understanding into the Kaptain platform itself. Kaptain can retrieve better project context earlier, reduce wasted retrieval tokens, and prepare more efficient model handoffs as code workflows grow.

Measurement note: June 25, 2026 clean exact-lookup benchmark on the Kaptain codebase. Direct Codex used 52,241 total tokens; Kaptain + KodeGraph used 11,438 total tokens with the same 1.000 gold-file recall.