Databricks Tests Agents on Millions of Lines
Databricks benchmarked coding agents on a huge repo. Learn why task cost, harness design, and repo shape matter.

Benchmarking coding agents on Databricks multi-million line codebase is a Databricks engineering blog post about testing AI coding agents against real work in a very large production repository. It asks a blunt question: when agents touch a mature codebase, which models actually finish useful tasks, and what do they cost to get there? The takeaway is not to crown one model forever, but to measure cost per finished task with the same seriousness you measure correctness. It is a better answer to how to train software teams on ai coding tools safely than another tool demo: make the work observable before you make it routine.
A coding-agent benchmark is a repeatable test that gives an agent a realistic software task, then measures whether the resulting change is correct, maintainable, and worth the cost. Databricks' version matters because a multi-million-line repo has the texture that toy benchmarks miss: old abstractions, build constraints, dependency edges, and enough context to punish shallow search.
Read the benchmark as a cost story
The easy read is a leaderboard. The better read is a unit-economics story.
Developers cared because the Databricks post moved the conversation from model vibes to task-level measurement. A cheap model can be expensive if it needs many more turns, reads too much code, or wanders before landing the fix. A premium model can be cheaper per completed task if it gets to the right patch faster.
That point showed up strongly in the developer discussion around the post. Many top models looked competitive, including open-source options, but the harness changed the cost-performance picture. GLM 5.2 was called out as a notable open-source step forward, while another recurring theme was simple: cheaper per token does not mean cheaper per task.
The trap is comparing list prices without counting the full loop. Count tool calls, failed attempts, test runs, review time, and retries. If an agent produces three plausible patches before one passes, those first two patches are part of the bill.
For Claude Code, Anthropic's coding agent, this means your useful metric is not tokens spent in one chat. It is something closer to: issue accepted, tests passed, review comments resolved, total agent time, total human time.
Watch the harness before the model
A benchmark harness is the invisible product in any coding-agent comparison. It decides what the agent sees, which commands it can run, how failures are scored, and whether the task feels like real engineering or a lab puzzle.
This is where Databricks' post is most useful for teams doing agentic coding in serious repos. The harness makes the difference between a fair test and a model personality contest. It can also explain why one model looks great in a benchmark and merely okay in your repo.
A concrete example: imagine a task to fix a flaky Spark connector test in a monorepo. If the harness tells the agent the failing test, gives it a clean branch, and lets it run the narrow test target, the task is scoped. If the harness drops the agent into the repo with only a vague issue title, you are benchmarking search behavior as much as coding ability.
The trap is letting the harness leak answers. A task that includes the exact function name, exact failure mode, and exact command might be measuring patch synthesis, not investigation. That is fine if you say so. It is misleading if you call it full-agent performance.
A good internal benchmark should preserve the boring parts: setup, test commands, local conventions, and the friction of finding the right file. That is the difference between a demo and evidence.
Measure the repo shape the agent sees
One under-discussed question from the Databricks benchmark is how programming language and repo shape affect cost. Strongly typed, verbose languages may give an agent more compiler feedback and searchable structure. Dynamic languages may produce shorter files but force more runtime exploration.
There is no universal answer. TypeScript may help an agent follow types and fail fast. Python may be faster to edit but easier to break at runtime. Java or Scala may burn more context, yet provide clearer call graphs and stricter build feedback.
The trap is treating language as a style preference instead of a benchmark variable. If you compare tasks across Python, TypeScript, Scala, and JavaScript, keep the task size and acceptance criteria honest. Otherwise you may attribute a repo-property result to a model.
This is also where concise repository memory helps. A small CLAUDE.md note that says which test command to run, where generated files live, and what not to edit can reduce waste without spoon-feeding the answer. Keep it short. Durable rules belong there; task hints do not.
If you care about the related training topic, this is the practical bridge: teach people to create measurable tasks, not just prettier prompts.
Try a small benchmark in Claude Code
You do not need Databricks scale to learn from the Databricks benchmark. You need a small task set, a fixed harness, and a receipt that records cost and outcome. This is the useful part for ai coding training for teams: practice measurement on real work before trusting agents on ambiguous work.
Prerequisites: choose one repo, 6 to 10 recently closed issues, a clean branch per task, the normal test commands, and one human reviewer who knows the code. Use issues that took a human between 20 minutes and 2 hours. Avoid giant refactors, secret-dependent tasks, and work that cannot be tested locally.
-
Step 1: freeze the task set. Copy the original issue title, expected behavior, failing test if one existed, and acceptance criteria into a small task file. Do not add hints you wish the issue had included.
-
Step 2: define the agent boundary. Decide which commands Claude Code may run, which directories are off limits, and whether it can access external systems. For a first pass, prefer read/write access to the repo, test commands, and no production credentials.
-
Step 3: use one slash-command workflow. Create a command such as
/bench-taskthat tells the agent to inspect, plan briefly, edit, run the narrowest relevant test, and produce a final receipt. The value is consistency, not magic wording. -
Step 4: record cost per accepted patch. Track model, task ID, wall-clock time, tool calls, tests run, human review minutes, and whether the patch would merge. A failed task still counts.
-
Step 5: vary one thing at a time. Change the model, the repository memory, or the test budget, but not all three. Otherwise you will not know what improved.
-
Step 6: verify the setup works. Re-run one completed human issue through the harness and check whether the benchmark output contains enough evidence for a reviewer to judge it without replaying the whole chat.
Here is a simple Claude Code slash-command shape you can adapt:
/bench-task
Goal: complete the task in tasks/{{TASK_ID}}.md.
Rules:
- Read the task and inspect the relevant code before editing.
- Make the smallest change that satisfies the acceptance criteria.
- Run the narrowest relevant test first, then a broader test only if needed.
- Do not edit generated files, lockfiles, or migration files unless the task requires it.
- End with a receipt: files changed, tests run, remaining risk, and whether the patch is ready for review.
This is not a full benchmark platform. It is a clean enough loop to teach the habit Databricks modeled: measure completed work, not agent enthusiasm.
Copy this task receipt
Use this when you want a lightweight artifact from each agent attempt. It is intentionally small enough to paste into a pull request comment.
Agent benchmark receipt
Task ID:
Repo area:
Model:
Agent boundary:
- Files/directories allowed:
- Commands allowed:
- External access:
Outcome:
- Accepted / rejected / needs human continuation
- Files changed:
- Tests run:
- Test result:
- Human review minutes:
- Agent wall-clock minutes:
Cost notes:
- Extra tool calls or retries:
- Places the agent got stuck:
- Context it had to rediscover:
Reviewer note:
- Smallest reason to trust this patch:
- Smallest reason to be cautious:
The trap is turning this into a bureaucracy form. Keep it short. If engineers will not fill it out after a real task, it is too heavy.
Common questions
-
Did Databricks prove which coding agent is best?
No. Databricks showed why realistic repo benchmarks are more useful than generic rankings. The result is time-bound and harness-bound: as of July 2026, model quality, token behavior, and open-source performance are moving fast enough that the measurement method matters more than a static winner.
-
How should we train software teams on ai coding tools safely after this benchmark?
Start with small, measured tasks from your own repo, not broad autonomy. The Databricks lesson is that safety comes from observable work: fixed task inputs, known test commands, clear agent boundaries, and receipts that let reviewers judge output without trusting the chat transcript.
-
Are hands-on ai coding workshops enough for this kind of practice?
Hands-on ai coding workshops help when they use real repo tasks and real review criteria. They are weak when they teach only prompt tricks. A useful session should produce benchmark receipts, failed attempts, and a shared sense of which tasks are currently fit for agents.
-
Should we benchmark by language?
Yes, if your repo spans languages or frameworks. Language can change search cost, compiler feedback, test speed, and context size. Compare similar task types across languages, then label the result carefully; otherwise you may mistake TypeScript, Python, or Scala repo structure for model intelligence.
-
Where do Claude and MCP fit into this story?
Claude, Anysphere's AI code editor, and the Model Context Protocol both affect the harness around an agent. Claude changes the agent interface; MCP standardizes access to external context and tools. In benchmarks, those integration choices should be recorded because they can change both success rate and cost.
Best ways to use this research
- Best for: deciding whether your current coding-agent experiments are measuring finished engineering work or just pleasing chat behavior.
- Best first artifact: a 6-task internal benchmark with one receipt per attempt and one reviewer decision per patch.
- Best comparison angle: cost per accepted patch, split by model, language, and harness permissions.
- Best limitation to remember: a benchmark from a multi-million-line Databricks repo will not transfer perfectly to a small service repo, but the measurement discipline transfers well.
- Best related read: Databricks Benchmarked Coding Agents at Scale if you want the companion note on the same source signal.
Further reading
- Benchmarking coding agents on Databricks multi-million line codebase — source
- Claude — Agent
- Model Context Protocol — specification
- Claude Code — overview
Next step
Pick six closed issues from one repo and run the same Claude Code workflow against each one. Do not change models, prompts, or permissions until you can explain the first set of receipts.
One methodology lens
One useful way to read this through our methodology is the Plan step: delegate first-pass decomposition and dependency mapping, review the sequencing and assumptions, and keep ownership of scope and priorities. If that split is still fuzzy, the workflow usually is too.
Related training topics
Related research

Claude Code 2.1.202 Adds Workflow Controls
Claude Code 2.1.202 adds workflow size guidance, OTel attributes, and fixes worth testing in one real repo.

Ask HN: Banned From Claude Code
A Hacker News Claude Code ban sparked a debate about account risk, fallbacks, and safer MCP habits.

Manufact (YC S25) Ships MCP Cloud
A story-first look at Manufact’s MCP Cloud launch and the safe Claude Code boundary to test first.