How OpenAI Used Codex to Build Tax Agents That Fix Their Own Mistakes
OpenAI's engineering blog details how Codex powers self-improving tax agents that processed 7,000 returns with up to 97% accuracy — a reusable blueprint for enterprise AI.
OpenAI’s engineering blog just published one of the more practically useful things the company has put out in a while: a detailed walkthrough of how Codex was used to build autonomous, self-improving tax agents for a real production environment. This is not a research paper or a product announcement. It is a documented case study of agents writing, testing, and refining their own code based on what went wrong in the previous batch of real tax returns.
The numbers are worth stating upfront: 7,000 tax returns processed across 30+ accounting firms, roughly one-third of preparation time saved, accuracy reaching up to 97%, and throughput up around 50%. At launch, only 25% of returns hit the 75% correct field-completion threshold. Six weeks later, that figure was 86%.
What They Actually Built
The project came out of a collaboration between OpenAI’s forward-deployed engineers and Thrive Holdings, building a product called Tax AI for Crete Professionals Alliance’s network of accounting firms.
The core problem they were solving is one that any team shipping AI into production will recognise: real-world data breaks things in ways you cannot fully anticipate before launch. You discover failures after the fact, then spend weeks manually inspecting edge cases, adjusting prompts, and translating practitioner feedback into product fixes. The feedback loop only moves when an engineer pushes it forward.
Their solution was to make the feedback loop mostly automatic. Every time an accountant corrected something the AI got wrong, that correction became a data point. Repeated corrections on the same type of field got grouped into a findable pattern. That pattern became a bounded, testable engineering task. Codex then handled the fix.
The hard data was not W-2s and 1099s. It was messy K-1s, rental schedules, handwritten notes, spreadsheets, prior-year files, and values that need to match across multiple documents. That is the kind of complexity that exposes gaps in any extraction-and-mapping pipeline.
The Three-Part Architecture
OpenAI describes the system as resting on three pillars:
Full production trace capture. The system records everything: the source file, the extracted field, the citation, the tax-engine mapping, what the accountant changed, and what eventually got filed. Nothing is thrown away.
Eval-driven failure detection. Production traces surface repeated field-level corrections. Those become failure signals. Ambiguous cases route to engineers. Clear patterns become bounded evaluations and candidate product changes. Each shipped fix generates new evidence for the next cycle.
Codex as the engineering agent. Given a scoped task with clear evidence, Codex inspects the trace, the eval suite, the repository, and relevant skills together. It works out whether the problem is a missing extraction pattern, a mapper gap, a source-selection issue, or something in the grader, then implements a targeted fix. It is doing the same thing a junior engineer would do with a well-written bug report, just faster and at 2am.
The rental property example from the post illustrates this well. The agent could inspect source documents, extraction traces, mapper behaviour, expected outputs, and regression tests before proposing any change. That bounded context is what makes the task tractable for an automated system.
What This Means for You
If you build software products, the strategic point here is the loop: agent output, expert review, corrections, better future performance. That cycle is where vertical AI products can become more defensible than generic agents. A general-purpose model can enter a workflow. A product built around a specific workflow can learn from it, encode domain-specific judgment, and turn repeated practitioner corrections into a progressively better system.
The key design decision OpenAI highlights is keeping humans genuinely in the loop without making that loop a bottleneck. A practitioner correction only becomes a Codex task after repeated issues are identified and grouped into actionable findings. Engineers retain oversight of architecture and product strategy. The automation is applied to a bounded extraction-and-mapping layer, not to everything at once.
For accounting firms and tax professionals, the immediate effect is faster processing with fewer manual errors, freeing staff for advisory work rather than form completion. But the longer-term implication is a system that gets better the more it is used, without requiring constant engineering attention to drive those improvements.
For anyone thinking about applying similar patterns to other domains, the post functions as a practical blueprint. Legal services, insurance processing, financial operations, consulting workflows: any domain with high complexity, regulatory specificity, and a steady stream of practitioner corrections has the raw material this approach needs.
Why the Engineering Blog Post Matters
OpenAI publishing this as an engineering post rather than a product announcement is deliberate. It is aimed at builders. The detail on harness engineering, eval infrastructure, and how to make tasks legible to Codex is genuinely instructive, and it builds on earlier posts like Unrolling the Codex Agent Loop.
Codex was originally positioned as a coding assistant. What this post demonstrates is its use as an operational layer in a production system: something that investigates failures, writes fixes, validates them against evals, and ships improvements continuously. That is a meaningful expansion of how the tool gets used in practice.
The broader shift this represents is worth noting plainly. Enterprise AI is moving from assistants that help workers complete tasks to systems that participate in and improve operational processes on their own. The tax agent example shows what that looks like when it is working. The accuracy trajectory from launch to six weeks in is the most concrete evidence that the self-improvement loop is real and not just theoretical.