Decoding Microsoft's Copilot Cowork lessons: six practices for running coding agents
A breakdown of how nine Microsoft engineers ran dozens of coding agents with specs, review bots, honest checks and repo rules, for teams scaling past one agent.
Picture a four-person platform team at a B2B SaaS shop. Over one quarter they went from one coding agent to five, each on its own branch. PR volume tripled. Now the humans are the bottleneck. A 30-file diff gets a skim instead of a review. The agents repeat last week's mistake because nothing carried over between sessions. Half the merge conflicts are in a registry file that every branch appends to. One day someone notices that a CI check has been green for a month while checking nothing.
Microsoft's Command Line blog published a field report on exactly this on Nov 2, 2026: Lessons from building Copilot Cowork. A small team took an agentic product from empty repo to worldwide GA, with agents writing most of the code, then moved the live runtime from Python to Rust. The post distills six practices. They are not a product you install. Most can be copied into a repo this week.
What it is
Copilot Cowork is Microsoft's agentic execution layer for Microsoft 365. Per WindowsForum's write-up, it sends emails, schedules meetings, creates documents and posts in Teams on a user's behalf. The news for builders is how it was built. According to Microsoft's post, the first commit landed January 13, Frontier customers got it March 30, and GA came June 16. On October 21, nine engineers merged 1,211 PRs into the backend's main branch.
The six practices, mapped to the lede's pains:
- Spec before code. No code without a markdown spec covering what the change does, how the team will know it works, and what it must not break. Many specs start spoken: an agent drafts from a talk-through and a human edits. The author thinks this did more for speed than any model upgrade. WindowsForum notes that this is opinion, not a measurement. This addresses vague requests that produce plausible but wrong code.
- Narrow agents inside boundaries. Each agent works in its own repo copy, on one task, from one spec, and model choice is treated as a quality-versus-cost tradeoff. In the product, the model runs in a container without user credentials. A trusted host handles identity, policy, approvals and tools. That interface later let the team swap the host during the Rust migration without touching the agent.
- Checks that prove they checked something. Engineers built competing review bots. When one missed what another caught, it got a new rule. Microsoft says each has been through at least 10,000 generations, and the median first review on a sample of recent merged PRs arrived in about four and a half minutes. Slower, specialized passes follow. Findings are split into blocking and advisory. Every check reports how many files it checked, and every new check ships with a test that makes it fail on purpose. This addresses the review bottleneck and the silently green check.
- Team memory in the repo. Instruction files sit at the root and in each component, plus a directory of about 30 topic rule files, the oldest dated August 6. A fix for a recurring mistake usually includes a new rule.
- Codebase shaped for parallel work. Registries became one file per entry. Generated files are regenerated after merge, and per-PR values like dates aren't committed. In the Rust workspace, every crate is now one of four roles: contract, kit, implementation or binary. Implementations can't depend on other implementations. A CI gate moved from report to ratchet. Implementation-to-implementation exceptions fell from 216 on August 22 to zero on October 7. This addresses the registry-file conflicts.
- Limits on loops. Per WindowsForum, every automated loop gets four things up front: a keep-or-revert rule, a measure that must not get worse, a cap on attempts, and a list of actions that still need a person.
Two packaged alternatives, both from GitHub:
- GitHub Agentic Workflows, GA Oct 28, 2026, compiles Markdown automations into Actions YAML. Agents run read-only by default, with writes validated through safe outputs. The trade-off: it is aimed at repo chores like triage and CI analysis inside GitHub Actions, and the default Copilot engine requires a Copilot license. Running it with Claude Code, Codex or Gemini needs that provider's account and API key instead, per Data Studios.
- Shared Copilot Automations, introduced the same day, combine prompts, triggers and tools that Copilot runs in GitHub's cloud, and are owned by the repository rather than one person. The trade-off, per Data Studios: less setup, but Agentic Workflows give platform teams code review over the automation itself, a choice of model provider and the full Actions policy stack.
Who it's for
Pick this up if you already run more than one coding agent against a shared repo and review or merge conflicts are where your time goes. It also fits if you're designing an agent product and haven't yet decided where credentials live. The host/container split is the cheapest to adopt early. Microsoft says building it in at the start was much easier than adding it later.
Skip the heavier parts if you're one person with one agent. The spec rule and the honest-check rule still apply. The review bots and the crate refactor don't.
Before and after
Before:
- Someone types a request into an agent chat.
- The agent produces a plausible diff, which gets a quick read.
- CI goes green, including a check that may be testing nothing.
- A merge conflict lands in a shared list file and someone resolves it by hand.
- The next session repeats the same mistake.
After, per Microsoft's post:
- A spec states the change, how success is judged, and what must not break. It is often dictated, then edited.
- One agent takes one spec in its own repo copy, using a model picked for that task's quality and cost needs.
- A first agent review arrives in minutes. Specialized passes follow, and findings are tagged blocking or advisory.
- Critical changes get at least one human check.
- Every check reports its file count and has a must-fail test.
- Registries and generated files are structured so parallel branches don't collide.
- Any repeated mistake becomes a rule file that every future agent session reads.
Try it
The smallest concrete step comes straight from the post: audit your CI scripts for checks whose exit code is swallowed by a pipe. Microsoft's size check piped output through tail. A shell pipeline returns the exit code of its last command, so the check passed while the limit was exceeded. The post shows both versions (lint-size-check is the team's own script name):
# The pipeline's exit code is tail's, so this always passes
lint-size-check | tail -1
# Keep the check's own exit code and print it
lint-size-check > out.txt 2>&1; rc=$?; echo "lint rc=$rc"; cat out.txt; [ "$rc" -eq 0 ] || exit 1
Then adopt the two-part rule: report files checked, and give each check a test that makes it fail.
Second step: write your next agent task as a three-part markdown spec, then add a root instruction file. Following Microsoft's pattern, add a rule each time an agent repeats a mistake.
If you want the read-only, gated-writes model without building a host, the GitHub Agentic Workflows quickstart starts with gh extension install github/gh-aw and gh aw add-wizard, per Azure Greg's walkthrough (Oct 29, 2026). Data Studios notes that runs consume Actions minutes and model inference.
Where it breaks
- Agent reviewers miss things. Microsoft admits that reviewer agents told to break a change in a sensitive area found nothing. Humans then found four blocking issues in the same diff. The post's answer is human checks on critical changes, so humans still bound throughput on high-risk work.
- Agents optimize for green. The post argues that agents keep working until checks pass, so a check that can pass without testing anything will eventually be exploited. Your checks become the real spec.
- Agents make structural messes. Agents put early Rust code wherever was easiest. At one point the main runtime binary was about 290,000 lines. The cleanup needed 401 work items with 2,225 dependencies, coordinated by an engineer at set checkpoints.
- The numbers are self-reported. The PR counts, review times and migration figures come from Microsoft, the team that built the product.
- Missing details. The sources we reviewed don't establish which agent tools or models the team developed with, or exactly how the review bots were configured. You can't replicate the setup one-for-one.
- Scale mismatch. These practices came from nine engineers on a greenfield Microsoft product. Our read: the spec, honest-check and repo-rules practices transfer to small teams. The competing review bots and the crate-role refactor are a big investment for most shops.
Sources
- Lessons from building Copilot Cowork · Command Line
- Microsoft Copilot Cowork: 1,211 Pull Requests in a Day and the Move from Python to Rust · WindowsForum
- GitHub Agentic Workflows: The Agentics Sample Pack and Issue Triage · Azure Greg
- GitHub Agentic Workflows generally available: engines, safe outputs, costs and plans · Data Studios ‧Exafin
- GitHub Agentic Workflows generally available - GitHub Changelog · The GitHub Blog