> ## Content Index
> Fetch the complete content index at: https://blog.netpy.in/llms.txt
> Use this file to discover other available public pages before exploring further.

# OpenAI let agents upgrade its Spark fleet. Read the scaffolding
- URL: https://blog.netpy.in/openai-spark-fleet-agent-upgrades/
- Published: 2026-11-25T12:35:56.000Z
- Updated: 2026-11-25T12:35:56.000Z
- Description: OpenAI's Codex agents upgrade a Spark fleet of millions of cores. The hard part was the shadow runs, config overrides and auto-rollback underneath.
- Author: Netpy Technologies
- Tags: AI, Agents, Data Engineering, Infrastructure, Engineering

OpenAI runs a Spark fleet of millions of cores over hundreds of thousands of datasets at exabyte scale. Upgrading it used to be work scheduled in quarters and staffed with the most senior people on the team. At QCon San Francisco this month, Mouli Mukherjee, who manages Data Infrastructure at OpenAI, described how they handed much of it to Codex-driven agents — and, more usefully, what they had to build first.

InfoQ's write-up leads with the agent fleet. The lesson is everything underneath it.

## The boundary comes first

Mukherjee stated the rule plainly: anything that must produce the same output for the same input — access control, configuration resolution, data correctness guarantees — stays inside a deterministic system. Agents call those systems as tools. They do not reimplement them.

That is the correct instinct, and the opposite of how most agent projects start. Teams begin with the agent, discover it needs to resolve configuration, and quietly let the model make a decision the config service should have made. Six months later nobody can say why a job ran on the wrong queue. Mukherjee's framing moves the boundary onto requirements: if you can enumerate the correct answer, write a system. Where failure modes cannot be enumerated in advance — a job that fails differently every time — an agent earns its cost.

## Safety scaffolding, then autonomy

For the Spark upgrade, the team built three things first.

A **shadow-run service** executes jobs using production inputs on a low-priority queue, so a pilot never competes with live traffic. A **configuration override service** keeps experiments from mutating global settings — the agent can change the run, not the platform. And a **validation skill** compares production output against the shadow run and produces a machine-readable report.

Only then did agents take over the loop: claim a job, launch a shadow run, read the validation report, classify the error, and transition the job to the new Spark version. Every step is a tool call with a known contract. The judgment sits in the classification — is this failure a real incompatibility, a flaky input, or a resource problem — and that is exactly the part a fixed playbook cannot cover.

The same primitives now cover more routine work: tuning job efficiency by inspecting query plans, proposing a config change and comparing runs; searching past incident reports and suggesting runbook updates; tracing a stale table through orchestrator and scheduler logs; explaining access-control denials. Permissions still enforce the user's own credentials — the agent does not become a superuser by being helpful.

## The tradeoff is stated, not hidden

Two details are worth more than the demo. For low-risk incremental library releases, the team sometimes skips the shadow step and promotes directly — trading compute capacity for rollback risk. And when a job passes shadow validation but fails in production anyway, it rolls back to the previous Spark version automatically, so pipelines keep running without a human at 3 a.m.

That auto-rollback is the actual safety mechanism — not the agent's confidence, not the validation report, but the fact that every promotion has a cheap, automatic inverse. Agents operate safely where being wrong is survivable.

And the honest caveat: the public write-up gives no upgrade counts, no capacity savings, no failure rates. This is a credible architecture, not a benchmark.

## What this means for teams outside OpenAI

The uncomfortable part is that the agent is the cheap component. Codex, or any competent coding agent, costs a monthly fee. The shadow-run service, the override service, the validation skill, the rollback path — that is months of platform engineering, and it decides whether the autonomy is safe.

Mid-market engineering teams in India usually have the raw material: Airflow or Dagster, a warehouse, a Kubernetes cluster, a scheduler. What they rarely have is a way to run a job twice and diff the result. Start there.

[NetPy](https://netpy.in/?ref=blog.netpy.in) builds and operates exactly this layer — pipelines, orchestration and cloud foundations, on infrastructure we run ourselves through [NetPyCloud](https://cloud.netpy.in/?ref=blog.netpy.in) — for clients who want AI in the workflow without handing a model the production switch. If you are planning an agent pilot on your data platform, the sequence below is how we would scope it.

## Checklist before you let an agent touch production jobs

1. Write down which decisions must be deterministic. Access control, config resolution, data contracts, retry policy. If an agent can change any of them, you have a bug.
2. Build a shadow execution path first. Same inputs, isolated queue, no shared writes. No shadow path, no agent.
3. Isolate configuration. An experiment must never be able to write a global setting; give the agent an override surface with a default that expires.
4. Make validation machine-readable. A pass/fail artifact per run, with the diff attached, so the agent is reasoning over data and not over vibes.
5. Give every promotion an automatic inverse. Version pinning plus a rollback that fires on production failure without a human.
6. Classify errors explicitly. A fixed taxonomy (incompatible API, shuffled data, resource pressure, flaky input) keeps the agent's judgment bounded and auditable.
7. Scope credentials to the requesting user. An agent acting on behalf of an engineer inherits that engineer's permissions, not the platform's.
8. Log every tool call with its inputs and the state change it caused. The audit trail answers "why did this job move" three weeks later.
9. Track cost per operation, not per agent. Shadow runs are not free; skipping them is a capacity decision, so make it deliberately.
10. Start where failure is recoverable. Read-only diagnostics and runbook suggestions first, then routine changes, then upgrades.

The interesting shift is not that agents can run operations work. It is that the teams who win will be the ones who spent the time making their operations reversible — and then found that the agent was the easy part.

*Header photo: NOIRLab HQ server room, Tucson. Credit: NOIRLab,* [*CC BY 4.0*](https://creativecommons.org/licenses/by/4.0/?ref=blog.netpy.in)*, via Wikimedia Commons. Illustrative image.*