Enterprise12 minNovember 30, 2026

iFood's AI Agents Across 15,000 Repositories

How iFood runs AI code review and maintenance agents across 15,000 repositories at about $0.04 per run: architecture, a step-by-step guide and limits.

iFood's AI Agents Across 15,000 Repositories

iFood AI Code Review at Scale: What 15,000 Repositories Taught Them

Until recently, a routine chore like patching a vulnerable library across a large codebase meant one thing: every team wrote its own script, babysat it, and repeated the exercise next quarter. iFood, the Latin American delivery company, maintains more than 15,000 code repositories, and that approach could never keep pace. Today the same chores go through a single internal service that has completed more than 25,000 agent runs at an average inference cost of about four cents each.

This shift matters now because coding agents have stopped being a developer's toy and become a line item you can budget, audit and scale. How iFood built it, what exactly more than doubled after the migration, and where the figures deserve a skeptical eye: all of that comes next.

A clarification before the details. The source for this story is OpenAI's customer story published on November 24, 2026. It does not describe agents replacing human reviewers. It describes agents that perform the repetitive checking and fixing work (validating code against internal standards, repairing vulnerable dependencies, running analyses) and then hand the result to people as a merge request. That is code review automation in its most practical form: the machine does the legwork, a human makes the final call.

The problem: the same task, 15,000 times

According to the customer story, every one of iFood's repositories periodically needs specific work: confirming the code meets internal standards, fixing vulnerable dependencies, or running an analysis. Victor Coelho, a senior software engineer at iFood, put the core difficulty in one line: (cite index="1-4">"The challenge is solving it at scale."

Solving it for one repository is easy. Solving it for 15,000 is a different category of problem. Secondary coverage of the story reports that teams had been building separate agent-based fixes for recurring jobs, and each effort ran into the same obstacle: no shared runtime for agents. Every team was rebuilding sandboxes, credential handling and result collection from scratch.

For an executive, this pattern is familiar. It is the same mess as ten departments buying ten different tools for one job. The cost isn't the licenses. It's the duplicated effort and the inconsistent results.

What iFood built

iFood's answer is the Remote Agents Platform. The idea in one sentence: (cite index="11-3">teams delegate the work, execution happens in a remote sandbox, and the result comes back as a merge request. Engineering tasks became API calls.

A coding agent at scale is not a smarter assistant. It's a shared piece of infrastructure, and it gets managed like one.

Architecture of the Remote Agents Platform

The three-step cycle

OpenAI's account describes a simple lifecycle. (cite index="11-5">The user submits a prompt and environment requirements through a REST call, the platform processes the task on a dedicated remote runner inside an isolated sandbox, and the result is retrieved later. The "later" part is the point: the run is asynchronous, so engineers hand off the job and return to other work while progress stays available for monitoring.

Deterministic frame, agentic core

The detail that interests engineers most is how the run is structured. Per the reporting on the story, the platform performs fixed, predictable steps at the start: (cite index="18-9">it clones the repository, loads the skills the agent can use, and prepares a working branch. The agent works in the middle. Then fixed steps at the end publish the merge request and make the generated artifacts available.

This is a sensible division of labor. Everything that can be written as ordinary code is ordinary code, with no model involved. Only the part that requires judgment goes to the model. Secondary coverage identifies it as GPT-5.6 Luna; OpenAI's own page refers to the balance of efficiency and intelligence of its model, which Coelho cited as the reason the platform can scale sustainably.

The sandbox and its reach

(cite index="11-6">The sandbox runs Ubuntu and includes the toolchains iFood's ecosystem requires: Python, Java, Kotlin, C#, TypeScript, Rust, JavaScript and Go. Beyond the sandbox, (cite index="11-7">the agent can access Nexus, GitLab, Docker, Snyk, Kubernetes, and AWS.

Note what this means. The agent doesn't live in a separate demo environment. It connects to the artifact repository, the version control system, the security scanner and the cloud that the company already runs. Integration with the existing stack, not model quality, is usually what decides whether a pilot becomes a production system.

Structured Outputs: how the system knows it worked

The least glamorous piece is the one that makes scale possible. Coverage of the story describes the platform as using a structured output system, so that results from the coding agents come back in a consistent, predefined format. A session reports success or failure in a format other software can read, so no human has to open 25,000 transcripts to find out what happened. The practical lesson: use structured outputs to classify success and failure automatically.

Results: what the numbers say, and what they don't

The figures reported in the story:

Metric Reported value
Code repositories covered 15,000+
Completed agent runs 25,000+
Tokens consumed 27+ billion
Average inference cost per run US$0.04
First major user Internal security product (dependency scanning and fixing)
Effect on that product Fix accuracy and number of vulnerabilities fixed both more than doubled

Some arithmetic helps here. 25,000 runs at four cents is on the order of US$1,000 in model inference. Dividing the tokens by the runs gives roughly a million tokens per run, so these are not trivial prompts but long working sessions. That cost covers inference only. Platform engineering, infrastructure and the time reviewers spend on merge requests are not in that number.

Read the case with open eyes

Three caveats matter if you plan to cite this to your board.

  • Source. This is a customer story published by OpenAI, the model supplier. Independent coverage noted that the figures come from iFood and OpenAI and haven't been independently verified.
  • Coverage vs. activity. The platform's reach across 15,000 repositories doesn't tell you how many distinct repositories have had completed runs or accepted fixes. Reporting on the story flagged this gap.
  • No baseline in hours. The story gives a "more than doubled" improvement for one security product, not engineer-hours saved across the company.

None of this undermines the case. It defines how to use it: as a proof that the architecture works in a very large estate, not as a guaranteed ROI figure for your company. For a comparison of how agents perform on real work versus lab tests, see our analysis of real-world performance of AI agents.

The expensive part of an agent was never the tokens. It's the absence of a shared runtime, and that is exactly what iFood fixed.

Technical guide: building the same pattern step by step

The steps below are our adaptation of the pattern described in the iFood story. The endpoints, field names and snippets are illustrative; they are not iFood's actual API.

Step 1. Pick one repeatable, verifiable task

iFood's first major customer was a security product, a smart choice: the task recurs, the outcome is checkable, and the benefit is measurable. Good first candidates are dependency updates, lint and standards checks, and license audits. Avoid open-ended feature work for now.

Step 2. Expose the agent as an async API

Hide everything behind a single entry point. Teams submit a prompt and environment requirements and get a job ID back. They never touch sandboxes or credentials.

curl -X POST https://agents.internal.example.com/v1/tasks \
  -H "Authorization: Bearer $TEAM_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "repository": "payments/checkout-service",
    "task_type": "fix_vulnerable_dependencies",
    "prompt": "Upgrade dependencies flagged by the scanner. Do not change public APIs.",
    "environment": {"toolchains": ["java", "kotlin"]}
  }'
# -> {"task_id": "tsk_8f2a", "status": "queued"}

Step 3. Run each task in an isolated sandbox

One task, one disposable environment, with the toolchains your languages need. Give the sandbox network access only to the systems the task requires (the package registry, the Git host, the scanner). In your own implementation, we recommend a short-lived token scoped to a single repository and task type. Read more on this approach in our piece on secure access for AI agents.

Step 4. Wrap the agent in a deterministic frame

Write the start and end of every run as plain code:

  1. Clone the repository.
  2. Load the agent's skills and instructions.
  3. Create a working branch.
  4. Hand over to the agent.
  5. Publish the merge request and attach artifacts (logs, reports).

The agent never decides how to open a merge request. It's code, and it behaves the same way on run one and run 25,000.

Step 5. Force a contract on the result

Define a schema that every session must satisfy, success or failure. With OpenAI's Structured Outputs you pass the schema with the request; the model's final answer then conforms to it.

{
  "type": "object",
  "properties": {
    "status": {"type": "string", "enum": ["success", "failure", "needs_human"]},
    "summary": {"type": "string"},
    "files_changed": {"type": "array", "items": {"type": "string"}},
    "checks_passed": {"type": "boolean"},
    "failure_reason": {"type": ["string", "null"]}
  },
  "required": ["status", "summary", "files_changed", "checks_passed", "failure_reason"],
  "additionalProperties": false
}

The needs_human value is our addition. Agents should have a legitimate way to say "this one isn't for me."

Step 6. Read results programmatically and route them

import requests, time

def wait_for_result(task_id, base="https://agents.internal.example.com"):
    while True:
        r = requests.get(f"{base}/v1/tasks/{task_id}").json()
        if r["status"] in ("done", "failed"):
            return r
        time.sleep(30)

result = wait_for_result("tsk_8f2a")
outcome = result["output"]            # validated against the contract
if outcome["status"] == "success" and outcome["checks_passed"]:
    notify_reviewers(result["merge_request_url"])
else:
    log_failure(result["task_id"], outcome["failure_reason"])

Step 7. Keep the human gate at merge

Per the story, the output is a merge request. That's the right place for the review: every company already trusts that gate, and your existing CI checks run on the agent's work just as they would on a colleague's. Never grant agents the right to push directly to the main branch.

Step 8. Track cost and quality per run

Treat cost per run as an architectural factor. Measure four numbers from day one:

  • cost per run and tokens per run;
  • retry rate (retries double spend quietly);
  • merge rate, meaning the share of merge requests accepted by humans;
  • time from task submission to merged change.

If you want the governance layer around this, our overview of managing AI agents in the enterprise covers ownership, permissions and audit.

What leaders should take from it

It's an infrastructure decision, not a tool purchase

The story's central argument, as one outlet summarized it, is that running coding agents at scale is an infrastructure problem. That reframes the budget conversation. You're not buying "an AI assistant for developers." You're funding a shared service that every team calls, the way they call payments or authentication.

Small companies get the pattern, too

You don't need 15,000 repositories. If you have 30, the same logic applies at smaller scale: one repeatable chore, one safe runtime, one human approval gate. Our case on AI coding for small business with Gondola shows what a modest start looks like.

Questions to put to your CTO this week

  1. Which recurring maintenance tasks eat engineer time and are verifiable by a machine?
  2. Do teams currently build their own agent scripts, each with its own credentials and sandbox?
  3. What does one agent run cost us, and who tracks it?
  4. Where is the human approval gate, and what happens when the agent fails?

A leader who gets clear answers to these four questions stops reading vulnerability reports with dread. The result is a calmer, more controlled relationship with technical risk: you know which tasks are automated, what each costs, and where a person signs off. In front of a board or investors, that posture reads differently from "we're experimenting with AI." It reads as an executive who turned a sprawling engineering estate into a managed, measurable process.

FAQ

What is iFood's Remote Agents Platform?

It's an internal iFood service that turns engineering tasks into API calls. Per OpenAI's customer story, a team submits a prompt and environment requirements, the task runs in an isolated remote sandbox, and the result comes back as a merge request for people to review.

Does the agent replace human code reviewers at iFood?

The story doesn't claim that. The agent performs tasks such as checking code against internal standards and fixing vulnerable dependencies, and it delivers its work as a merge request, so a human decision remains at the end of the chain.

How much does it cost to run?

OpenAI's story reports an average inference cost of US$0.04 per run, across more than 25,000 runs and more than 27 billion tokens. That figure covers model inference only, not the platform's engineering and infrastructure costs or reviewer time.

What results did iFood report?

The first major user, an internal security product that scans the repositories for vulnerable dependencies and attempts fixes, saw both fix accuracy and the number of vulnerabilities fixed more than double after migrating to the platform. These numbers come from iFood and OpenAI and haven't been independently verified.

Can a smaller company use the same approach?

Yes, the pattern scales down. Start with one repeatable, checkable task, run it in a sandbox with narrowly scoped access, and keep a human approval step on the merge request.

Why do structured outputs matter here?

They make every agent session return its result in a predefined format, whether the outcome is positive or negative. That lets software decide automatically whether a run succeeded, which is what makes tens of thousands of runs manageable.

Compare your own estate with iFood's

Take a sheet of paper and write down three things: how many repositories or systems your company maintains, which routine checks and fixes your engineers repeat on them, and who currently owns those tasks. If the honest answer is "each team does it differently," you're standing where iFood stood before the platform. The distance between that point and a shared, auditable agent runtime is shorter than it looks, because the first step is one task, one sandbox and one merge request.

Then set your own numbers beside theirs: cost per task, share of fixes accepted, time to merge. If you'd like to talk through how this pattern maps onto your business, start a conversation in the AI chat and bring your answers with you.

Have questions? Ask the AI agent right now

Responds in seconds, knows everything about our services and will help with your situation