OpenAI Built ChatGPT Ads With Codex in 6 Weeks

OpenAI engineer explains how ChatGPT ads were built with Codex coding agents

ChatGPT ads went from launch to $100 million in annualised recurring revenue in six weeks, and to $1 billion in under 200 days. OpenAI’s Brian Yang says nobody wrote the code by hand. Speaking at QCon San Francisco 2026, Yang described how a handful of engineers used Codex to build the whole product. He worked at Google, Meta and LinkedIn before joining OpenAI as a founding member of technical staff on the ads team.

Engineers become agent managers

Yang argues that the craft survives but changes shape. The real work is designing the machinery that produces the product. In practice that means one person supervising agents that triage a bug, raise a pull request, draft docs and fix a broken CI run in parallel. He likened it to multi-processing.

His closing point: engineers will do for agents what managers do for people today. The skills that grow in value are setting direction, designing architecture and verifying results.

Testing in layers

All changes pass local and unit tests. Trickier ones also go through scripted browser journeys that mimic a user. The riskiest changes are exercised in sandboxes that copy production and replay representative traffic.

Those sandboxes take three forms: read-only, write-only with telemetry switched off, and full fidelity, where telemetry carries a shadow tag so analytics can drop it later. The team wants about 90 percent of routine PRs approved automatically. Each week it looks back at the last 300 to 400 PRs and tests its reviewer thresholds against that goal.

A sanitised latency experiment shows the method. Candidate PRs aimed to lower time-to-first-ad at P50 and P95, with limits on ads returned, timeouts and error rates. A and B cleared the bar. C failed, because its sandbox run produced no ad at all. Usually 30 to 40 candidates are packed into one PR and run together for a day or two before a person looks, since a change that is fine on its own can break when combined with others.

Failure modes Yang has seen

Left unchecked, agents fill a codebase with junk, which Yang calls slop. Maintenance agents work alongside the feature agents and hunt for the cause of any new log pattern. Agents also write too many tests, so he reads through the 50 slowest each week.

In one case an agent removed and rebuilt slow Kubernetes pods unprompted. His lesson is to borrow large-company safeguards: named roles allowed to do destructive things and a physical confirmation before deploys.

He asked teams to question inherited beliefs, for example that four nines of uptime outranks extra revenue. Each engineer should get a monthly AI budget, and no one should publish a leaderboard of usage.

Getting a team on board

The route he recommends starts small: hand one PR to an agent, then one feature, then a whole project. Skipping straight to the last step is where things fall apart.

For doubters, he suggests a rotating AI champion who serves two weeks. The champion chooses the most tedious chore the team repeats. At OpenAI one example is GPU provisioning, which can eat hours of snapshots, permissions and waiting. The champion teaches an agent to do it from start to finish as a reusable skill and shows it off at the end. After a year that is 26 chores that agents own, which persuades skeptics better than promises.

How Yang works day to day

He favors Codex’s two-way voice mode over typing. The agent questions him for around ten minutes about requirements, they settle on a spec, and the spec goes to several agents. An orchestrator thread starts five sub-threads that try different approaches at once, and he keeps the best.

He changes models only when a release makes the workflow noticeably smoother, with fewer clarifying questions at the same quality. Benchmark scores do not drive the decision.

What to make of the claims

The revenue and timeline figures come from the speaker, and nothing independent backs them up. The working practices are specific enough to try: layered sandboxes, bundled candidate PRs, and a weekly look at the slowest tests. Teams can adopt those on one feature before committing to a whole project.

Source: InfoQ

Written by

Saksham Bhargava

Saksham Bhargava runs Alteroid and has been writing about consumer technology for over five years, covering iPhone, Android, Windows, AI tools and gaming. With an MCA and six years of hands-on web development experience, he tests the features he writes about on his own devices and focuses on clear, practical guides that solve real problems. Away from the screen, he enjoys travelling to places most tourists skip.