iFood’s internal platform completed over 25,000 agentic coding tasks across 15,000 repositories, averaging $0.04 per run and more than doubling the accuracy of its internal security fixes. The system, called the Remote Agents Platform, treats routine engineering work as asynchronous API calls. Teams submit a prompt and environment requirements, the platform provisions an isolated sandbox, and the agent returns a merge request or a structured failure report. The architecture deliberately separates predictable I/O from model execution, keeping token consumption predictable and execution environments reproducible.
The runtime is the bottleneck, not the use case
iFood maintains a sprawling codebase that requires periodic validation, dependency updates, and security scans. Executing these tasks on a single repository is straightforward. Executing them across 15,000 repositories exposed a missing layer: a dedicated execution environment.
“Solving this for one repository is easy. The challenge is solving it at scale,” says Victor Coelho, Senior Software Engineer at iFood. “Solving it at scale across all 15,000 repositories.”
Before the platform, engineering groups built fragmented automation scripts that consistently stalled on orchestration. The Remote Agents Platform centralizes that layer. It exposes a simple REST API that accepts a prompt and environment specifications. The platform handles provisioning, lifecycle management, and result retrieval. Developers launch tasks and return to their work, monitoring progress only if they choose to.
The workflow deliberately separates predictable operations from model execution. Deterministic steps bookend the process: the runner clones the target repository, imports the agent’s skill set, and checks out a working branch. After the model finishes, the runner publishes the merge request and archives generated artifacts. The agentic phase sits in the middle, running inside an isolated Ubuntu sandbox equipped with Python, Java, Kotlin, C#, TypeScript, Rust, JavaScript, and Go, alongside standard system utilities.
The sandbox connects to iFood’s existing infrastructure stack, including Nexus, GitLab, Docker, Snyk, Kubernetes, and AWS. This design keeps the agent close to the tools it actually needs while preventing cross-contamination between concurrent runs. Each task receives its own clean environment, which eliminates state drift and ensures that repeated runs on the same repository produce consistent baselines. The platform tracks progress in real time, but the asynchronous design means developers do not need to maintain active sessions or manage background processes manually.
Structured outputs replace monitoring
Delegating execution at scale introduces a verification problem. The platform cannot manually review thousands of merge requests or session logs. iFood’s solution relies on Structured Outputs to enforce a predefined contract on every agent session.
Illustrative image: theaflowers / Pixabay
Once execution completes, the platform parses the response against the expected schema. The contract specifies exactly which fields contain the diff, the dependency update, or the analysis result. If the agent deviates, the parser flags it. This approach removes ambiguity from the output stream and allows the platform to automatically classify each run as successful or failed without human intervention. The contract ensures that every session returns a predictable payload, whether the agent succeeds or encounters an error.
The security team was the first major consumer. The platform now scans the entire repository fleet for vulnerable dependencies and attempts to patch them. According to the company, the migration more than doubled both the accuracy of the generated fixes and the total number of vulnerabilities resolved. The security group did not need to build an agentic runtime or hire prompt engineers. They called an API.
The asynchronous design shifts the productivity gain from raw execution speed to workflow decoupling. Developers can launch code fixes, performance analyses, or dependency updates during meetings or deep work sessions. The task runs without supervision, and the result arrives as a merge request or a structured failure notification. Routine work no longer competes for the team’s attention, leaving engineers to focus on problems that require judgment rather than monitoring.
Cost dictates what scales
Model selection for a platform of this size requires looking past single-metric benchmarks. iFood evaluated candidates on three axes: intelligence, execution speed, and token efficiency. The team selected GPT‑5.6 Luna because it offered the strongest combined profile across those dimensions. For a one-off debugging session, speed and cost are secondary. For a platform processing 27 billion tokens across tens of thousands of runs, the balance determines whether the architecture remains sustainable.
The $0.04 average cost per run is not a minor operational detail. It is an architectural constraint. Engineering leads can now calculate whether automating a specific workflow is economically viable before writing a single line of orchestration code. Workflows that exceed the target cost per task will not scale, regardless of their technical feasibility. The platform treats cost per task as a gatekeeper for automation, ensuring that only high-volume, predictable workloads justify the token consumption.
The platform currently powers asynchronous execution for security and routine code validation. iFood plans to expand the API to additional internal products, but the expansion will be bounded by the per-task cost model. The team treats the Remote Agents Platform as an internal equivalent to public batch and agent APIs, prioritizing predictable execution, isolated environments, and contract-bound outputs over raw model capability. The bottleneck was never the use case; it was the runtime. With the execution layer centralized, other teams can now delegate agentic work without rebuilding infrastructure or managing sandbox lifecycle.
Sources
PNEUMETRON EDITORIAL
Pneumetron's pipeline pairs AI-assisted drafting with human editorial review before publishing — our goal is to make staying informed easier, not to replace real reporting.




