Harvey’s AI Agents Wrote 1M Lines to Match Microsoft Word

Harvey co-founder Gabe Pereyra wrote on Tuesday, 17 November, in an X article titled “How Cognition and Harvey build autonomous engineering teams”, that a team of about thirty AI agents directed by one Harvey manager, Phil Cerles, has written “over a million lines of code” in three weeks for a new document editor that has to behave exactly like Microsoft Word.

Our number: on Pereyra’s figures, that is more than 47,000 lines of code a day over 21 days, by our arithmetic (over 1 million lines in three weeks). Cerles also runs Harvey’s Assistant team of about thirty people, so one manager now directs a human team and an agent team of roughly the same size.

Business Pill · Operating Leverage

An evergreen Business Engineer explainer on operating leverage, why profit can grow faster than sales when costs are fixed. It teaches the general idea only and does not discuss Harvey or Cognition.

The key insight: Harvey says one manager directing about thirty agents produced over a million lines of code in three weeks, more than 47,000 a day by our arithmetic, on a project where Microsoft Word itself is the answer key the agents check against.

How the Agent Team Is Organised

Pereyra wrote that Cerles talks to one agent, the director. The director manages four leads, “and each lead starts and retires its own workers”. The agents “work around the clock”, and Cerles sees three things: “decisions only he can make, changes to approve and plain-language briefings”.

The structure came from the agents. Pereyra wrote that at first one manager agent had about eighteen others reporting to it. After a lead called a test run clean without reading one of its jobs, which held a real failure, “the manager wrote Phil a proposal for its own reorganization: four leads and a verification loop”.

What the agent team building Harvey’s Word-compatible editor has produced, as Harvey co-founder Gabe Per
What the agent team building Harvey’s Word-compatible editor has produced, as Harvey co-founder Gabe Pereyra reported it: 14,600 tests and more than 7,000 commits in the repository, 2,145 test documents opened and saved back unchanged for one recent release, and 669 bug-register entries. Source: Gabe Pereyra, X article, 17 November 2026; company’s own figures, not independently verified. The per-day rate is our arithmetic.

Why Word Is the Test

Harvey runs as an add-in inside Word, and Pereyra wrote that “In October lawyers sent Harvey 6.6 million drafting requests in Word”. The rule for the new editor is that a file “has to open in Word exactly as it was left, with every tracked change and comment intact”. When an agent is unsure, another agent repeats the action in Word itself and compares the saved files.

The team works under three written rules: “Word is always right.” “Never corrupt a document.” “Every bug becomes a test.” Pereyra’s general point: “Work has to be verifiable before agents can do it alone”.

What a Release Has to Pass

  • Code base. The repository now has more than 7,000 commits and 14,600 tests, and the team’s bug register has 669 entries. The engine is written in Rust with a TypeScript editor surface.
  • Corruption checks. For one recent release, about 12.8 million edits were checked “with no failures”, and 2,145 test documents were “opened and saved back unchanged”.
  • Agent lawyers. Four agents use the editor through a real browser. Two negotiate a Series A purchase agreement against each other in one live document; two fill in long forms. Over ten runs in eight days the verdicts went from two of the four saying not yet to all four saying yes.

Where the Model Came From: Cognition’s Android App

Pereyra credits Cognition’s Russell Kaplan. In his account, Cognition builds its Android app with a Devin bot “managing a team of Devins, and no engineers”, with one goal, parity with the iOS app, and a budget. Kaplan posted on Tuesday that the app is “owned by an autonomous swarm of Devins which are goaled on maintained feature parity with iOS”, and that the engineer who created the bot “has never built an Android app or written Kotlin”.

Cognition has described other agent-run work before, such as Devin handling on-call alerts.

The Business Lever

The lever is engineering cost on work that can be checked against a reference. Pereyra wrote that Harvey now asks two things of a project: “what it can be checked against, and who answers for the result”. Cerles calls the agent team “an acquired company that builds this feature for us”, and Harvey’s engineers send ideas to the agent team rather than editing the code.

Harvey builds AI for legal work, and the same day OpenAI released Astra for Law, tested on Harvey’s LAB-AA benchmark. How labs price agent work is a separate question: OpenAI runs 500+ agents like contractors and Anthropic sells managed agents on quote-based pricing.

The Structural Read

As we read the article, the claim that carries over is the condition, not the count: Pereyra ties agent autonomy to having a reference to check against, an iOS app for Cognition and Word for Harvey.

As we read the figures, lines of code and commit totals show volume; the release gates, 12.8 million edits with no failures and 2,145 documents saved back unchanged, are the quality evidence Harvey offers, and they are its own.

Gabe Pereyra, Harvey co-founder, X article, 17 November 2026

“Work has to be verifiable before agents can do it alone, and the more a project has to check against, the more of it you can hand over.”

Three Implications

FOR ENGINEERING TEAMS Pereyra wrote that Harvey engineers now send proposed ideas to the agent team, whose memory and decision logs catch flaws, rather than working in the code itself.

FOR HARVEY Pereyra wrote that the editor is in testing inside Harvey and not finished; the first version is one lawyer and Harvey in a document.

FOR COGNITION Kaplan wrote that Cognition’s Android app is owned by an autonomous swarm of Devins goaled on feature parity with iOS.

The Business Engineer Lens

This story maps onto the Business Engineer framework AI & The Harness Theory.

The framework says: “It is an operating system that wraps your AI — a harness that compresses your thinking, your team’s feedback, and the model’s raw capability into something replicable.”

As we read it, Harvey’s director, leads, written rules and release gates are such a harness built around the agents, with Word as the fixed reference. The framework predates this article and does not discuss Harvey or Cognition.

What Is Not Established

All figures are Harvey’s own, published by its co-founder, and were not independently verified. Pereyra wrote that the editor “is in testing inside Harvey and it is not finished”; live co-editing comes later. The article names no model vendor and gives no cost or budget for the agent team. Lines of code and commit counts measure volume, not quality. The per-day rates are our arithmetic. We did not contact Harvey or Cognition.

This Week In The AI Supercycle

AI Lost Its Central Banker, the Lab Oligopoly, and the Future of Open Source

This week’s issue: the Nvidia leadership change, read as the AI build-out losing its central banker: who now finances the GPU landlords, backstops the data centres and sponsors open models, and why two labs are becoming the bank.

Read the full issue →

Business Engineer Framework

AI & The Harness Theory

A Business Engineer analysis of the operating system you build around AI models to make their output replicable.

Read the Map of AI →

The Bottom Line

Harvey says one manager directing about thirty agents produced over a million lines of code in three weeks for a Word-compatible editor, more than 47,000 lines a day by our arithmetic, with Word itself as the test the agents check against. The editor is still in internal testing.

95,000+ executives read Business Engineer for the AI strategy frameworks cited by ChatGPT, Claude, and Perplexity.

A note on sourcing. The team structure, rules, code and test counts, release gates and quotations are from Harvey co-founder Gabe Pereyra’s X article of 17 November 2026 and his post that day, read in full; Cognition’s Android example is from that article and Russell Kaplan’s X post the same day. All are the companies’ own accounts and were not independently verified. Astra for Law, OpenAI’s agent controls and Anthropic’s managed-agent pricing are from our earlier coverage. The per-day rate is our arithmetic. We did not contact Harvey or Cognition.

Sources: Gabe Pereyra (Harvey), X Article: How Cognition and Harvey build autonomous engineering teams, 17 Nov 2026 · @gabepereyra on X, 18:18 UTC, 17 Nov 2026 · @russelljkaplan (Cognition) on X, 19:17 UTC, 17 Nov 2026

Scroll to Top
FourWeekMBA