
TL;DR
- Lights-out engineering means you hand clear work to agents, close your laptop, and check the results later. Not chatting back and forth until it's done.
- It's already happening. The .NET team and the Copilot Cowork team both let agents write most of the code. Both came to the same conclusion: agents implement, people define the work and judge the result.
- It doesn't work by itself. In dotnet/runtime, the merge rate went from 42% to 72% in ten months, mostly because of better tasks and better instructions.
- You need three things in place: autonomy, context and memory.
- You don't need a big framework to start. The Copilot cloud agent, custom agents and agentic workflows already get you most of the way. I put a starter template in lights-out-engineering.
More and more of the companies I work with ask me the same question: can AI agents keep working on our codebase after we close our laptops? I gave a talk about it today, and this is the written version.
Inside Microsoft this is already happening a lot. Teams assign work to agents, close their laptops and check the results later. That's quite different from how most of us use agents today: you and the agent go back and forth until the result is finally there.
The technology is ready for it, but it doesn't happen by itself. It changes how a team plans its work, shares knowledge, checks quality, and where people stay in control. So this post is about what you need in place before you let agents run on their own, and how to start small.
Two teams, same conclusion
dotnet/runtime: from 42% to 72%
Let me start with a story from Stephen Toub, a Distinguished Engineer on .NET. He works on dotnet/runtime, one of the most demanding codebases out there: the garbage collector, the compiler, the core libraries.
One Saturday he was at a kids' birthday party. Apparently the party wasn't that great π , so in about an hour, from his phone, he assigned more than twenty backlog issues to the Copilot cloud agent. By the evening he had reviewed 22 pull requests. Another time, on a cross-country flight without a laptop, he opened nine pull requests and seven got merged: bug fixes, tests, performance work and a 112-file cleanup.
His description of it stuck with me: "My job was different. I wasn't writing code. I was identifying work, scoping problems, and giving direction. The agent did the implementation."
His team used the cloud agent in that repo for ten months and wrote down what they learned. The most useful part for me is which tasks worked:

Cleanup and tests do best because they're routine and clearly defined. The agent has little room to interpret them its own way. Bug fixes worked best with steps to reproduce, the expected result and the actual result. A vague bug report gets you a vague fix. New features and performance work, which need judgment and deep knowledge of the code, came last.
And the numbers weren't great from the start. In the first month only 42% of the agent's pull requests got merged. The agent couldn't even build the code, and there was no instructions file. Ten months later it's holding at about 72%. The models got better, but Stephen calls it a story of learning: which tasks to assign, how to write instructions, how to iterate.
Copilot Cowork: 1,211 pull requests in a day
The second story is about a brand-new product. The team behind Copilot Cowork wrote about building it from an empty repo. First commit on January 13, worldwide general availability on June 16. In January they merged 257 pull requests. On October 21, nine engineers merged 1,211 pull requests into main in a single day.
Their summary: "Agents wrote most of the code, but engineers remained responsible for defining the work and judging the results." And what slowed them down wasn't the agent: "The bottleneck was not knowing exactly what we wanted."
The sneaky part is what happens when you're vague: "A vague request got us code that looked reasonable, survived a quick read, and then did the wrong thing." So better agents don't make the human part smaller. They make it more important.
A mature codebase and a brand-new product, and both draw the line in the same place.
And it's not just Microsoft. According to Octoverse 2026, more than 40% of pull requests in September started with an agent's first draft, up from 17% in March. The fastest-growing mode is the Copilot cloud agent, the one where you assign a task and walk away: up 230% year over year, against 85% for agent chat.
What a full agent team looks like
Teams that go fully agentic often stop using one assistant for everything and start working with a team of agents. That fixes a few cracks in the "one chat, one agent" model:
- Context disappears. Every new chat starts from zero.
- One agent does everything. Frontend, backend, database and security rules all compete for attention, so you get generic answers.
- No team memory. Six months later, nobody knows why it was built this way. Not even the AI.
- You're still the bottleneck. You stopped writing code, but now you're prompting, checking and retrying. The agent is faster; the system isn't.
Squad is one of the frameworks that tries to fix this. Run squad init and your repo gets a .squad/ folder with plain Markdown: who's on the team, who handles what, a shared decisions.md, and a charter and history file per agent. This is what that looked like in the demo:
A coordinator routes your request to the right specialists, who run in parallel in their own context. Scribe merges decisions into decisions.md after each session. And Ralph, the work monitor, watches your issue backlog and keeps the team busy while you're asleep. In the second demo I gave the team a PRD as a GitHub issue and asked them to break it down. The issue list on top shows what happened in GitHub while the team worked:

Squad even runs a retro after a broken build or a rejected review, and turns the actions into GitHub issues. Nothing had failed here, so I asked for one:
It's powerful. But it can also overwhelm you: it takes effort to fit into your codebase and asks people to change how they work. So in the talk I took it apart.
Take it apart: three things you need
It comes down to three things:
- Autonomy. The work starts, runs and gets checked without you sitting next to it.
- Context. The agent knows what to do before it starts.
- Memory. The team gets smarter with every run.
Autonomy: in the execution layer
Software development isn't only implementation. There's requirements, specs, reviews and deployments too. Both stories above say the same thing about where autonomy belongs: in the execution.

You steer the spec and the plan. The agent drafts the tasks and you check them. Then the lights go out for the execution. And at the end, AI review comes first, then people, and you merge.
GitHub already gives you most of the execution layer:
- Copilot cloud agent. Assign an issue or start a task from the Agents tab, pick a custom agent and a model, and it works in a GitHub-hosted sandbox, in GitHub Actions, or on a machine of your own. An enterprise policy controls where it's available, so you can start with a few repos.
- Agentic workflows. GitHub Actions workflows where an agent does the work, written in plain Markdown. The difference with the cloud agent is what starts them: an event or a schedule instead of a person.
- Built-in checks. By default the cloud agent checks its own work before handing it over: CodeQL, new dependencies against the GitHub Advisory Database, secret scanning and a Copilot code review. If something turns up, it tries to fix it first.
Context: write down what it would ask you
A cloud agent has nobody to ask. So you write down what it would otherwise ask you:
- Instruction files like
copilot-instructions.mdorAGENTS.md. For delegation, the most useful parts are practical: how to build and test, what to check before opening a pull request, which folders to leave alone, and what to do when it isn't sure. - Custom agents in
.github/agents. Specialists with their own instructions and tools. My frontend engineer may only change the frontend folder and adds a Playwright test for every new page. Like Squad's team, without the framework. - Clear issues. The issue is the only conversation the agent gets: a goal, acceptance criteria, the files that matter and what's out of scope.
To get to issues like that, I use spec-driven development with Spec Kit (OpenSpec works too). You write the spec, clear up open questions and make a plan locally, with you steering. Then /speckit.taskstoissues turns tasks.md into GitHub issues. I customized it a bit: one parent issue for the feature, each task as a sub-issue, and dependencies linked as "blocked by".
From there, agentic workflows take over in my demo:
- When a task gets its label, a workflow finds the tasks that aren't blocked, picks the right specialist for each one and assigns it to Copilot with that custom agent. It leaves a comment saying why.
- Every task gets its own specialist, its own session and its own small pull request. Much easier to review than one big one.
- When Copilot finishes, a workflow requests Copilot code review, lets Copilot fix the comments and merges. Merging closes the task, so the next unblocked tasks get picked up.
- When the last task closes, a final workflow starts the app, takes a screenshot, checks each scenario from the spec and closes the feature.
The part I'm happiest with is how the assign workflow splits plumbing from judgment. Fixed code works out which tasks are ready and does the actual assignment. The agent only decides who should do the work:
For **each** ready issue:
1. Read the issue title and body. The body points to `specs/<feature>/` β read the
matching task in `tasks.md` and the `plan.md` if you need more context.
2. Pick the **one** specialist from `.github/agents/` that should do the work.
- `frontend-engineer`: UI, pages, components, API client code in `frontend/`.
- `backend-engineer`: API routes, validation, database and business logic in `backend/`.
- `design-assets`: styling, theme, layout polish, SVG images.
- `tester`: adding or fixing automated tests, build/verification-only tasks.
3. Add the label `agent:<specialist>` to that issue.
4. Call `assign_specialist` with the `issue_number` and the specialist name.
5. Add one short comment (1β2 sentences) to that issue: which specialist you picked and why.
Memory: give your agent a notebook
The last piece is memory, so the next agent knows what the last one learned, and why. I wrote a whole post on this: Give your agent a notebook. It covers Anthropic's benchmark, GitHub's citation-based memory, Copilot Memory and Copilot Dreaming.
The short version for lights-out work: start with a folder of Markdown notes, only write down what the agent can't look up in the repo, make every note checkable, and let an agentic workflow tidy it up every week. My agent-notebook kit sets that up for you.
One night on the lights-out shift
Put together, it looks like this:

Human-led at the start, autonomous in the middle, human-approved at the end. Lights out doesn't mean nobody is in charge.
What's not there yet
- My review gate merges without a human. That's the point of the demo, so you can see the whole loop. In a real project, that's where a person steps in. Keep branch protection on and decide which changes still need a person.
- Not every task fits. New features and performance work had the lowest merge rates in dotnet/runtime. For work that needs judgment, an agent on your own machine, where you can steer it, may be a better fit.
- It takes setup. Custom agents, a token that can assign Copilot, compiled workflows. That's a lot less than a full framework, but it's not nothing.
- Garbage in, garbage out. It all depends on the spec. If you don't know exactly what you want, the agents will happily build the wrong thing very fast.
Want to try it?
Three things I'd take home:
- Your job moves to both ends. You decide what to build, make the tasks clear and check the result.
- The setup makes it work, not the model alone. Clear tasks, instructions, memory and checks are the parts you control.
- Start small, this week. Take one spec, split it into a few small issues and assign them to the cloud agent. Add more only when you see it helps.
The template from my demo, with the custom agents, the customized Spec Kit command and the workflows, is in lights-out-engineering. If you try it, break it, or find a part that's annoying, I'd really like to hear about it.
References
- Stephen Toub: Ten Months with Copilot Coding Agent in dotnet/runtime
- Bas Brekelmans: Nine engineers, 1,211 pull requests in a day: Lessons from building Copilot Cowork
- GitHub Blog: Octoverse: Commits, pushes reach new highs in 2026 as developers build with agents
- Squad: GitHub repository, documentation and ceremonies
- GitHub Spec Kit and OpenSpec
- GitHub Docs: Copilot cloud agent
- GitHub Docs: Creating custom agents
- GitHub Docs: Risks and mitigations for Copilot cloud agent
- GitHub Agentic Workflows
- My earlier post: Give your agent a notebook
- My kits: lights-out-engineering and agent-notebook