Skip to content

Research

The engineering behind ML AI Code.

A coding agent is only as reliable as the system around it. This is how ours decides what to read, what it may change and what counts as done, and what we have measured so far.

19/30repository issues accepted on the first attempt
25/40hard multi-file tasks accepted on the first attempt
69/70tasks with an independently accepted patch across retained attempts
128smedian agent time per issue in the latest batch

Development evaluations on selected public tasks, graded outside the agent. Not an official leaderboard score. Method and limits.

The idea

Reliability is a systems problem.

Most failed tasks we have studied were not failures of raw ability. The agent lost the thread of a long task, edited outside what was asked, or said it was finished without proof. Each of those has an engineering answer, so we build the answer into the runtime rather than hope for it.

Six systems sit between the request and the result. Every one is ordinary, inspectable code with its own tests.

modelContractContextMemoryGuarded editsVerificationSafety policy

Six systems

What happens between your request and the result.

01

Task contract

Before the first edit, the request becomes a written contract: what to deliver, which files are in scope and which checks must pass. Progress is derived from that contract, and a task cannot finish while a deliverable is open.

ScopeDeliverablesRevisions
02

Context management

Long tasks outgrow any working memory. Older tool output is summarised at a fixed threshold while the original request, every correction and the most recent steps stay word for word. Nothing is deleted: the full history can be read back.

CompactionRepository mapSkills on demand
03

Guarded edits

Every change is checked as it is written. An edit that breaks a file which parsed a moment ago is refused, a checkpoint is taken before each step, and parallel helpers work in their own copies so nothing collides.

Syntax guardCheckpointsIsolated copies
04

Independent verification

"Done" is treated as a claim. The run records which commands ran, how many tests they covered and whether the code changed afterwards. Claims without matching evidence get one correction round, then are reported as unproven.

Evidence ledgerCompletion reviewDiff checks
05

Safety policy

Each command is classified before it runs. A short list is always refused, a repository file sets the rules for that project, and a team can only tighten those rules, never loosen them.

Command classifierSecret scanProtected paths
06

Continuity

Work survives interruptions. Actions with side effects are journaled before they start, decisions and open questions carry to the next run, and specialists can be resumed with what they already found.

Effects journalDecision memoryBackground jobs

Verification

Done is a claim. We check it.

The agent that wrote the change is not the one that decides it works. A separate gate reads the record of the run and refuses the common ways a result can look finished without being finished.

  • No tests actually ran. A command that collects zero tests is not a pass.
  • A failure hidden in a passing summary. Every failed case fails the check.
  • Code changed after the check. Evidence older than the latest edit is stale.
  • A claim with nothing behind it. Each deliverable needs a passing check, a cited source or a real file.

The gate checks records and provenance. It does not judge whether your requirements were the right ones.

Context

Keep the thread on long tasks.

Hours into a task, most of what the agent has seen is old command output. We compact that selectively instead of truncating it.

128kworking-context tokens before older output is summarised
8 to 16most recent messages always kept in full
100%of the original history archived and readable on request

The first request and every correction you make are pinned. If a summary would drop protected content, the run stops safely instead of continuing on a weaker memory.

Safety

A boundary the agent cannot talk its way past.

Rules are enforced by the runtime, not by instructions in a prompt. Each project runs on its own isolated machine, and every command passes a classifier before it executes.

# .mlai/policy.yml  (reviewed like code)
production:
  require_pr: true
  require_ci_green: true
  block_paths_without_review: ["payments/**"]
agent:
  commands:
    allow: ["npm test", "pytest*"]
    deny:  ["terraform apply*"]
secrets:
  scan: true

Always refused for the agent, whatever a project says: piping downloads into a shell inside a workspace, publishing packages, reading SSH keys, force pushes and production deploys outside the deploy review.

Results

Measured on real repositories.

Seventy tasks from two public benchmark families: reported issues in widely used open-source libraries, and a harder set of multi-file changes. We report first attempts and later repairs as separate numbers, because they answer different questions.

How a result is counted

  1. Tasks are chosen and committed before any run. No replacements after seeing outcomes.
  2. The reference fix is never shown to the agent. Reference tests arrive only after it has stopped and lost network access.
  3. Grading runs on a clean copy with only the agent’s patch applied.
  4. Accepted means every required test passes and nothing that passed before now fails.
  5. Setup failures and missing labels stay in the denominator.

How to read it

First-attempt numbers span several versions of the system as it improved, so they are not one fixed-version score. Some later repairs were given feedback from grading. That shows the system can reach a correct fix, not that it will on an unseen task.

Time to a patch, latest issue batch

Agent working time for each first attempt, in seconds. Excludes machine setup and grading.

AcceptedNot accepted

Failures drive the roadmap

What measured failures changed.

  • Long command output crowded out the task.Slow or verbose output is now saved outside the repository and read back in bounded pieces, without rerunning the command.
  • Reviewers judged a summary, not the request.Read-only reviewers now receive the full original task and the current diff, and inspect the real code.
  • A cut-off reply could be half a command.Truncated commands are never executed. Empty replies trigger one bounded recovery, then an explicit failure.
  • The completion gate was too strict.Replaying 18 retained runs showed it blocking correct patches. It stays experimental until it stops doing that.

Not proven yet

What this evidence does not show.

  • An official benchmark score. These are development runs on selected tasks.
  • How we compare with other coding agents. We have not run a matched comparison and make no parity claim.
  • Performance on tasks the system has never seen. A held-out set is next.
  • That task-specific guidance makes runs faster. One matched pair finished about twice as fast with it; one pair is not a result.
  • Live measurements for memory, repository understanding, durable continuation and visual review. They are built and unit tested; benchmarks are pending.

Standing on open work

Ideas we studied and built on.

Several of these systems follow designs published by open-source projects. We name them because the ideas are theirs; the implementations and results here are ours.

Read less about it. Run a task.

Every run shows its plan, its commands and its evidence.