Back to Research

Databricks Benchmarks Coding Agents on Its Codebase

Databricks tested coding agents on a huge real codebase, and the useful lesson is cost per finished task.

Marshlands, landscape painting by Théodore Rousseau.
Rogier MullerJuly 10, 20269 min read

Benchmarking coding agents on Databricks multi-million line codebase is a July 2026 Databricks engineering post about measuring coding agents on a very large, real production repository. It deals with the question every AI-coding user eventually hits: which agent actually finishes useful work, and what does that finished work cost? The takeaway is simple: judge coding agents by completed tasks, review evidence, and harness behavior, not by model vibes or token price alone. For anyone trying to train software teams on ai coding tools safely, the post is a reminder to practice on measured repo tasks before trusting bigger changes.

Read the benchmark as a task-cost story

A coding-agent benchmark is a controlled set of coding tasks used to compare how often agents complete work, how much context they consume, and what evidence they leave behind.

That definition matters because the Databricks post is not just another leaderboard. Databricks tested coding agents against a multi-million-line codebase, which is closer to the mess most engineers live in: old abstractions, hidden dependencies, non-obvious tests, and lots of files the agent might read before touching the right one.

The interesting part is the unit of measurement. A cheap token is not the same thing as a cheap completed task. If one model wanders for twice as long, reads half the repo, and still needs a human to rescue the diff, the invoice and the review cost both move.

That is why developers cared. The story lined up with what many engineers have seen in real repos: several frontier and open models can look competitive, but the harness around the model often decides whether the session is useful. For more background on the same Databricks signal, see Databricks Tests Agents on Millions of Lines.

The trap is treating the result as a universal ranking. A benchmark on Databricks’ codebase is evidence from one serious environment, not a law of physics for your service, your tests, or your review culture.

Notice the harness before the model name

The harness is the operating loop around the model: prompts, repo instructions, tools, test commands, permission boundaries, context retrieval, and the way success is scored.

That loop changes cost-performance. An agent with a good harness can find the right files quickly, run the right checks, and stop when it has enough evidence. The same model with weak instructions may burn tokens discovering basics your repo could have told it up front.

A small example is an AGENTS.md file at the repo root:

# AGENTS.md

- Do not edit generated files under `src/generated/`.
- For API changes, update `openapi.yaml` and run `npm run test:api`.
- Prefer focused diffs. Do not reformat untouched files.
- Before final output, include: files changed, tests run, and risks.

That is not magic. It is boring context, written once, so the agent does not rediscover it every session.

The trap is benchmarking a model while accidentally benchmarking your missing instructions. If the agent fails because it guessed the wrong test command, you learned something about your repo surface, not only the model.

Treat language and repo shape as variables

One open question around the Databricks benchmark is how programming language changes cost per task. Strongly typed languages can be verbose, but they also give agents compiler feedback, richer signatures, and safer refactor paths. Dynamic languages can be faster to edit, but the agent may need more tests or runtime checks to prove the change.

So do not copy someone else’s scorecard without copying the conditions. A TypeScript API migration, a Python data-path fix, and a Scala build change are different tasks. They stress different parts of the agent: search, planning, type reasoning, test selection, and patience.

In a Codex workflow, this shows up quickly. Codex, OpenAI’s coding agent, may be excellent at producing a plausible patch, but your repo decides whether that patch is cheap to verify. If the test suite is slow, flaky, or undocumented, the agent has a harder job and the human reviewer inherits more uncertainty.

The trap is using “lines changed” as a proxy for difficulty. A three-line concurrency fix can be harder than a 200-line mechanical rename.

Try a smaller Databricks-style experiment in Codex

You do not need a Databricks-sized repo to learn from the Databricks benchmark. You need a few real tasks, a clean receipt, and a rule that every agent run must end with proof.

Prerequisites:

  • A repo with tests you can run locally or in CI.
  • Five small issues that already have expected behavior.
  • A root AGENTS.md with the repo’s sharp edges.
  • A read-only first pass for any external data through MCP. Model Context Protocol, Anthropic’s open protocol for connecting models to tools and data sources, is powerful enough that boundaries should be explicit.

Step 1: choose five closed tasks. Pick issues that were already fixed by humans, then reset them on a branch. Good tasks include a failing unit test, a small API behavior change, a typo in a migration, a UI state bug, and a narrow refactor.

Step 2: write the expected verification before running the agent. For each task, name the command that proves the fix. Example: npm test -- user-settings.test.ts or pytest tests/test_permissions.py -q.

Step 3: run the agent with the same boundary every time. Keep the prompt, permissions, and available tools stable. If one run can write files and another can browse a private knowledge base, you are no longer comparing agents cleanly.

Step 4: record completed-task cost, not just token cost. Track whether the patch passed tests, how many files the agent read, how many turns it needed, and what the reviewer had to fix. This is the practical heart of ai coding training for teams and hands-on ai coding workshops: people learn fastest when the receipt shows what happened.

Step 5: verify with tests, diff, and review. End every run by checking the diff and rerunning the expected command yourself:

git diff --stat
git diff -- src tests
npm test -- user-settings.test.ts

The setup works when two people can read the receipt and agree whether the task was completed. That is also the cleanest answer to how to train software teams on ai coding tools safely: start with measured tasks where failure is cheap and review evidence is required.

Copy this mini benchmark receipt

Use this as a light artifact after each run. It is intentionally small. If it takes longer to fill out than the task itself, people will stop using it.

task: "Fix user settings save button disabled state"
repo_area: "web/settings"
language: "TypeScript"
agent: "Codex"
model_or_route: "record the configured model or router"
branch: "agent/settings-button-disabled"

boundary:
  writable_paths:
    - "src/settings/"
    - "tests/settings/"
  readonly_paths:
    - "docs/"
  mcp_access: "read-only; no production writes"

expected_verification:
  - "npm test -- user-settings.test.ts"
  - "npm run lint -- src/settings"

result:
  completed: true
  turns: 4
  files_read: 18
  files_changed: 3
  tests_passed: true
  human_followup: "renamed one variable; no logic change"
  review_risk: "low"

notes:
  - "Agent first inspected the component, then the reducer, then added a regression test."

This receipt also keeps the conversation honest. If a cheaper model needs many more turns, or if a stronger model reads far more context to succeed, you will see it in the same place you see test proof.

The trap is filling the receipt with subjective ratings like “good” or “bad.” Use facts first. Save opinions for the review note.

Common questions

  • How do we train software teams on ai coding tools safely after reading this?

    Start with small, already-understood repo tasks and require a receipt for every agent run. The Databricks lesson is that completion, cost, and verification belong together; a training task should record files changed, tests run, tool access, and human follow-up before anyone treats the result as trustworthy.

  • Does a cheaper model always cost less per task?

    No. A lower per-token price can lose if the model takes more turns, reads more files, or produces patches that need more human repair. The useful unit is cost per accepted task, which includes tokens, elapsed time, test runs, reviewer attention, and failed attempts.

  • Should we benchmark on our whole repo at once?

    No, start with a thin slice of real tasks. Five to ten tasks across different repo areas are enough to expose missing instructions, slow tests, permission problems, and language-specific friction. A whole-repo benchmark sounds impressive, but it can hide the exact failure mode you need to fix.

  • Do hands-on ai coding workshops need a benchmark like this?

    Yes, but keep it small and local. A workshop works better when engineers compare agent runs on familiar code, not toy problems. The benchmark does not need to rank every model; it needs to teach what a good task boundary, test receipt, and review loop look like.

  • Where do MCP boundaries fit in this kind of measurement?

    MCP boundaries belong in the benchmark receipt because tool access changes the task. An agent with read access to docs, tickets, or schemas has a different context budget than one using only the repo. Start read-only, name the allowed systems, and log any write-capable tools separately.

Best ways to use this research

  • Best for: engineers comparing coding agents on real maintenance work, especially when token price and task completion appear to disagree.
  • Best first artifact: a five-task benchmark receipt with expected tests, writable paths, MCP access, and human follow-up.
  • Best comparison angle: cost per accepted patch, not model rank, chat quality, or raw tokens.
  • Best Codex habit: put durable repo rules in AGENTS.md, then make every agent session end with a diff, test command, and risk note.
  • Best related map: use the related training topic when you want the broader set of review guardrails, MCP boundaries, and agentic coding practices.

Further reading

Next step

Pick three old bugs from your repo and rerun them through Codex with the same receipt. If the agent cannot leave a clear diff, test result, and risk note, the benchmark already taught you something useful.

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

Continue through the research archive

Ready to start?

Transform how your team builds software.

Get in touch