Harvey's Spectre: What Broke After 10,000 Agent PRs

AI Engineer
agentsenterpriseautomationproductivityclaude

How Harvey Runs Every Coding Agent on One Cloud Platform

Joey Wang built Spectre, the internal cloud agent platform at Harvey, the legal AI company. Last month more than one agent started on it every minute, day and night, and about 460 people at Harvey used it. Agents on Spectre have written 10,000 pull requests, and the work has spread beyond code: data questions answered in Slack, and a marketing teammate who dropped a prototype and talk track into Slack and asked for help with a product video. His opening line sets the theme: "the agents were the easy part." This talk is about the harness, everything around the model: checking out repos, holding keys, opening PRs and getting them merged.

Don't compete with coding agents, run them: Asked why Harvey would build this when Claude Code and Cursor exist, Wang answers: "We don't compete with them. We run them." A laptop realistically runs five to ten agents. Beyond that you need the cloud, and the cloud needs company secrets, the real stack, alerts and tickets, one set of rules and fair capacity. When engineers asked how to get secrets and a real test stack into Cursor, the answer became "just ask Cursor to use Spectre." People pick Claude Code, Codex, Cursor, ChatGPT or Slack, start locally, push the session to the cloud and pull it back. Shared knowledge lives in projects, where people write down how to test the tricky service, agents record what they learn, teams pin trusted skills and there's a record of who ran what.

Build the follow-up loop first: In Wang's ideal flow, an alert fires in Slack at 2 a.m., an agent picks it up, writes a fix, spins up a real copy of the stack and posts proof on the PR. When CI fails, a follow-up loop reads the failure and pushes another fix. By morning the PR sits in the normal review queue under the same rules as any other, and once approved an agent can auto-merge it. The follow-up loop was switched on for everyone in early October, and that month four out of five agent PRs merged into the backend had been through it. "That's the difference between an agent that writes code and an agent that finishes the job."

If a person can click it, an agent can call it: In May exactly one Spectre task all month started from a terminal. Harvey then made every action callable from the CLI: start a task, turn on the follow-up loop, arm auto-merge, publish a page. Laptop agents, agents inside sandboxes and CI can all call it. By October the command line was starting about 6,500 tasks a month, and terminal-started tasks merged more PRs than browser-started ones. Wang himself used a Claude Code session as coordinator to split a big job into 10 milestones and fan hundreds of tasks out to Spectre, each validating end to end in its own sandbox. The slowest step in a task wasn't the model but Git: checking out every repo took over a minute on average, fixed by keeping a copy of each repo on every machine for tasks to borrow.

Two bursts that filled the cluster: In mid-August a bug fired an alert once per workspace, and a Slack workflow tagged the agent on every alert. A normal day starts about 50 tasks from those alerts; in about four hours, around 900 agents chased the same bug until the cluster had no room. The fix: a repeat alert now joins the investigation already open. In October an engineer did what Harvey had been asking for and handed work to Spectre, about 950 tasks from the command line in about three hours, and everyone else's work queued behind one laptop. Four days later Spectre had a fair-share launch queue that gives each task a visible place in line, lets people at the keyboard go first and lets anyone borrow capacity when the cluster is quiet. Under a 300-task burst, launch latency fell from almost 2 seconds to 70 milliseconds.

The bottleneck moves to merging: At the end of October Harvey's dev platform team raised an alarm: PRs across the company jumped around 60% in a single month, a merge that took 15 to 30 minutes took over an hour, and the merge queue kept having to be switched off. Wang says they haven't cracked it. Meanwhile automations, agents that wake on a schedule or event to triage alerts, review PRs or write posts, are the fastest-growing source of work, with about 110 people running them. Each gets guardrails on day one: it switches itself off after five failures in a row and can carry a budget or expiry date, because "when no one's watching, an agent can start thousands of tasks too."

5 Lessons From Harvey's Spectre Cloud Agent Platform

  • The harness is the product - Models and coding agents are interchangeable; secrets, sandboxes, review rules and capacity are what make them useful at company scale
  • Own what happens after the code is written - The CI follow-up loop and auto-merge turn agent drafts into merged work
  • Make every action agent-callable - CLI access let agents orchestrate other agents and drove terminal usage from one task to about 6,500 a month
  • Cap what any agent, human or alert can start - Deduplicated alerts and a fair-share queue stopped single sources from starving the cluster
  • Give automations kill switches - Auto-disable after five consecutive failures, plus budgets and expiry dates

What Spectre Means for Companies Scaling AI Coding Agents

Wang's three lessons, own what happens after the code is written, make every action callable by an agent, and cap what any agent, human or alert can start, apply to any organization moving from a few laptop agents to hundreds of cloud ones. The open problem is the one every team will hit next: merging when agents never stop opening PRs. Today only one merge in 20 at Harvey carries proof that the change works. For one answer on the review side, see how Robinhood lets an agent clear 60% of data pipeline PRs.