<- all tokdocs

How Boris Cherny Uses Claude Code: /loop and Thousands of Sub-Agents

By , founder of Mavric and Apso

View on TikTok ->

Boris Cherny built Claude Code at Anthropic, and in a talk clipped by @shawnos.ai he describes running five to ten Claude Code sessions at once, a few hundred agents at any given time, and a few thousand sub-agents overnight. Most of that work runs through a pattern he calls /loop: Claude Code sessions scheduled with cron to repeat on an interval.

How many Claude Code sessions does Boris Cherny run?

Asked how many sessions he typically runs, Cherny says five to ten. Each session spawns a group of agents, which adds up to a few hundred agents running at any given time. Every night, a few thousand sub-agents take on deeper work while he sleeps.

What is the /loop pattern in Claude Code?

/loop is the pattern Cherny says he uses more and more. Claude uses cron to schedule a repeating job at an interval, such as every minute, every five minutes or every day. Each run is a Claude Code session that does its job without someone starting it.

He has dozens of these loops running, each for a different purpose. The two examples he gives:

  • One loop babysits his pull requests. It fixes CI issues and rebases branches automatically.
  • Another keeps CI healthy by catching flaky tests.

Loops vs sub-agents

Cherny describes two ways to manage work at this scale. One is to ask Claude to use a group of sub-agents and spread work across a problem. The other is the loop. He says the loop has become his default because it is the simplest thing that works: cron jobs that start Claude Code sessions to handle ongoing maintenance without a person in the loop.

In his setup, sub-agents handle the deeper overnight work that does not need an immediate answer, and loops handle recurring upkeep like PR and CI maintenance.

How to apply this

The pattern Cherny describes needs no special tooling beyond Claude Code and a scheduler. Pick a recurring maintenance chore, such as rebasing open PRs or rerunning flaky tests, and schedule a Claude Code session to handle it on an interval. Start with one loop and add more as each proves reliable.

Bottom line

The creator of Claude Code runs it at a scale of hundreds of agents by day and thousands of sub-agents overnight. The piece most people can copy is /loop: scheduled Claude Code sessions that handle PR babysitting and CI health on a timer.

Sources

Published May 12, 2026. Based on a TikTok by @shawnos.ai. Full video notes (markdown)