The product behind the pull requests
Copilot Cowork is Microsoft's agentic execution layer for Microsoft 365. It carries out multi-step work on a user's behalf. Microsoft's documentation says you describe what you need, and Cowork sends emails, schedules meetings, creates documents, posts in Teams, and manages your calendar.
The public timeline lines up with the engineering story:
- The first commit landed on January 13.
- Enterprise customers got it through the Frontier program on March 30.
- Microsoft announced worldwide general availability on June 16.
- It requires a Microsoft 365 Copilot user license, but usage is billed separately through Copilot Credits.
- At GA it ran on Anthropic models, including Opus 4.8 and Sonnet 4.6.
The team puts the span from empty repo to GA at about four and a half months.
The scale, in Microsoft's numbers
- Merged PRs per month rose from 257 in January to 2,754 in May.
- The busiest pre-GA week had 783 merges.
- The week of October 12 saw 4,581 merges, about 650 a day.
- The 1,211-PR day, October 21, falls just outside the October chart window, which runs only through October 20.
The author is clear that this is not a target. Engineers still define the work, set architecture and security boundaries, and judge the results. In the author's words, agents can propose changes but cannot decide what is allowed to happen.
Six practices
1. Spec before code
The rule is no code without a markdown spec. Each spec says what the change does, how the team will know it works, and what it must not break. Many specs start as someone talking through a feature aloud. An agent drafts the spec and a human edits it. Brekelmans thinks this did more for speed than any single model upgrade, though that is his opinion and not a measurement.
2. Narrow agents inside boundaries
Each agent works in its own repo copy, on one task, from one spec. Model choice is treated as a quality-versus-cost tradeoff. In the product, the model runs in a container with no user credentials. A trusted host outside the container handles identity, policy, approvals, tools and audit. Every Microsoft 365 operation passes through the host.
The model can plan and ask for anything, and the host decides what happens. Because the interface was defined from the start, the team could later replace the whole host without touching the agent. That is what made the Rust migration possible.
3. Checks must prove they checked something
Several engineers built competing review bots. When one bot caught what another missed, the miss became a new rule. Each has run through at least 10,000 generations. The median first review on a sample of recent merged PRs arrived in about 4.5 minutes. Slower passes then examine call-graph wiring, restart safety and metrics, and every changed file. They also compare behavior against the code being replaced.
Agents are not infallible. Reviewer agents told to break a change in a sensitive area found nothing. Humans then found four blocking issues. Critical changes now get at least one human check. Findings fall into two tiers:
- Blocking: correctness, security, data loss, or a new mechanism with no test that would catch it breaking.
- Advisory: everything else. The author can fix it or reply, and it does not force another review round.
The most reusable lesson here is a bug many shell users have hit. A size-limit script piped its output through tail. A pipeline returns the exit code of its last command, so the check stayed green while the limit was exceeded. The fix saves the check's own exit code and fails explicitly:
lint-size-check > out.txt 2>&1; rc=$?; echo "lint rc=$rc"; cat out.txt; [ "$rc" -eq 0 ] || exit 1
The team found similar problems elsewhere. One was a formatter that received an empty file list. Another was a changed-files list that came back empty after commit. Their two-part rule is that every check reports how many files it checked, and every new check ships with a test that makes it fail on purpose. Brekelmans argues this matters more with agents, because agents keep working until checks pass and will eventually find a path where a check tests nothing.
4. Put the team's memory in the repo
Each agent session starts with no memory of the last one. Recurring mistakes led the team to add instruction files at the repo root and in each component. They also added a directory of topic rules, about 30 files now, the oldest from August 6.
Merge conflicts were mostly not in logic. They were in files every branch appended to. The fixes were structural:
- Registries became one file per entry.
- Generated files are regenerated after merging, never merged by hand.
- Values that change on every PR, such as dates and counts, are no longer committed.
5. Shape the codebase for parallel work
On August 20 the Rust workspace had 86 crates and a dependency chain 13 levels deep. A change to the shared base crate forced a rebuild of 43 of 63 crates. The API crate had grown to 134,000 lines. About 12,000 lines of business logic sat in the binary.
The team assigned every crate one of four roles:
- Contract: types and interfaces.
- Kit: shared helpers with no internal dependencies.
- Implementation: may depend on contracts and kits, but not on other implementations.
- Binary: wiring code only, and the only role allowed to depend on implementations.
New code gets no exceptions. The cleanup ran as 401 work items with 2,225 dependencies between them, batched so parallel agents would not touch the same files. A CI gate began as a report and became a ratchet, where the number of allowed exceptions can only fall.
| Metric | Before | After |
|---|---|---|
| Implementation-to-implementation exceptions | 216 (Aug 22) | 0 (Oct 7) |
| Max allowed dependency depth | 10 | 3 |
| Crates | 86 | about 176 |
| Longest sequential rebuild chain after a base-crate change | 11 | 3 |
The build-time gains were smaller than predicted. The compile cache already hit about 99% of the time on PR builds, so the structural improvement is the real measurable result.
6. Give automated loops targets and limits
Every loop gets four things decided up front:
- A rule for when a change is kept or reverted.
- A measure that must not get worse.
- A cap on attempts.
- A list of actions that still need a person.
One merge-shepherding agent stops after 20 rounds, or after the same CI failure three times. Deploying to production and changing configuration remain human decisions.
Three loops are described:
- Test speed. A harness only merges changes that CI timing shows are at least 5% faster. Every assertion is compared against the original. About 300 such PRs have merged since mid-September. Touched test files fell from roughly 17,700 seconds of CI time to about 1,700.
- Document quality. Three of 10 passes were kept. A pass had to win more comparisons than it lost, leave the bottom 10% of scores no worse, and trigger no hard-check failures. Some passes won head-to-head and were still rejected.
- The factory. Deterministic rules turn production signals into work items, such as error clusters, broken builds and oversized files. Each item starts from a production number and carries a test that fails before the fix. Critics run on a different model family from the agent they check. Before opening a PR, the harness reverts the fix and reruns the tests. A test that still passes without the fix is not accepted as evidence. After merge, it follows the change into the first production ring to see whether the signal dropped. Microsoft says it does not need customer-content access and reproduces issues from logs and user feedback.
The Python-to-Rust migration
Python got the team to GA, and Brekelmans doubts they would have hit June with anything else. At scale, three problems showed up:
- Event-loop stalls of up to 11.9 seconds. Lock renewals waited, and some turns lost their locks.
- A hidden timeout. 16.7% of session setups took exactly 5.000 seconds, which was a timeout firing and not real work.
- Memory kills. The killed process was almost always the Python one, 539 times in one week on one cluster.
Moving blocking work off the loop helped. It also showed that the single event loop was the real limit.
Proving the port was right
Reading Rust beside Python does not scale. For each ported behavior, a generator runs the real Python over a set of inputs. It records response bodies, status codes, log lines and storage writes as a JSON fixture. The Rust test replays the fixture and must match exactly. Nobody edits fixtures by hand. Generators have a check mode that fails if the fixture drifts from the Python. There are about 430 fixtures.
The sample test asserts the number of cases (48) before comparing any of them, because a replay over zero cases would also pass. It is the same lesson as the tail bug. When the Python is deleted, its last fixture stays as the specification for the Rust code. Allowed differences go on a known-gaps list that can only shrink.
Timeline
- September 23: the first internal attempt, rolled back.
- September 24: Rust served its first production turns.
- October 9: the Python runtime was deleted, about 8,000 files and 4.9 million lines including tests and generated code.
- October 10: the last cluster moved.
Traffic moved one cluster at a time behind flags that could switch back. Rust commits climbed from about 200 in July to roughly 3,900 in September.
Results, with caveats
Time to first token on a session's first turn was compared over the same 12-hour window in late September:
| Runtime | p50 | p90 |
|---|---|---|
| Python | 7.9 s | 14.5 s |
| Rust | 2.7 s | 6.2 s |
The author cautions that not all of this comes from Rust. The same change moved the agent loop out of a slow-starting container and into the Rust service. He thinks that accounts for a large part of the gain. Cost per turn has not been properly measured, so Microsoft makes no cost claim.
Two defects slipped through:
- Python had been delivering certain events in order without anyone specifying it. The first Rust version did not, and no fixture caught it.
- The first Rust front door took about six times longer to acknowledge a new message because it waited for the whole pickup.
Both were fixed. The ordering bug shows the limit of the fixture method: it only protects behavior someone thought to record.
What to take from it
Be careful with the headline number. 1,211 PRs says little about quality or value on its own. It says even less about whether a team of nine could work this way without the safeguards the authors describe. The post makes that point itself, and its most credible parts are the failures. Those are the reviewer agents that missed four blocking issues, the check that could not fail, and the fixtures that missed event ordering.
If you want to try the approach without dozens of agents, the post's own advice is modest:
- Pick one check your team trusts and make it fail on purpose, to confirm it can.
- Choose one bounded task and write down what success means and what must not break.
- See what changes when an agent works inside those limits.
- Audit your scripts for pipelines like
cmd | tail, and make every check report how many items it examined.
For IT admins, the wider context is that Cowork is a metered, admin-governed feature. Microsoft Learn says it uses usage-based billing, and admins can see usage in the Microsoft 365 admin center and set per-user or per-group limits. The engineering story is mostly about speed. The boundary design described here, with a credential-free model and a policy-enforcing host, is the part that matters most to people deploying it.
References
- Nine engineers, 1,211 pull requests in a day: Lessons from building Copilot Cowork - Microsoft Microsoft · 2026-11-02T15:13:56+00:00
- Copilot Cowork overview learn.microsoft.com
- Copilot Cowork is now generally available microsoft.com