---
title: "How Boris Cherny Uses Claude Code: /loop and Thousands of Sub-Agents"
date: "2026-05-12"
video_id: "7636251443296521503"
tiktok_url: "https://www.tiktok.com/@shawnos.ai/video/7636251443296521503"
creator: "@shawnos.ai"
category: "AI"
tags: ["claude code", "boris cherny", "sub-agents", "/loop", "cron"]
excerpt: "Boris Cherny, who built Claude Code, runs 5 to 10 sessions, hundreds of agents and thousands of nightly sub-agents. Here is how his /loop cron pattern works."
---
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.

![Boris Cherny speaking at an event with a name badge, captioned "I run THOUSANDS of sub-agents every night"](tokdoc_frames/frame_001.png)

## 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.

![Boris Cherny explaining the Loop pattern with a microphone](tokdoc_frames/frame_015.png)

## 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

- [Claude Code documentation](https://docs.anthropic.com/en/docs/claude-code): Anthropic's docs for the CLI.
- [Anthropic](https://www.anthropic.com): the company where Cherny built Claude Code.


## Video description and verification notes

Boris Cherny, who built Claude Code at Anthropic, revealed his actual workflow at a recent event -- and it is far beyond what most users imagine. Five to ten sessions running simultaneously, hundreds of agents working in parallel, and thousands of sub-agents doing deeper work overnight. This is not theoretical; it is how the tool's own creator operates day to day.

## The Scale of Operation

When asked how many sessions he typically runs, Cherny's answer was startling: five to ten sessions, each spawning a bunch of agents, totaling a few hundred agents running at any given time. Every night, a few thousand sub-agents tackle deeper work while he sleeps.

## The Loop Pattern

The pattern Cherny has been using more and more is what he calls Slash Loop. The concept is simple: Claude uses cron to schedule a repeating job at some interval -- every minute, every five minutes, every day. He has dozens of these loops running for different purposes. One babysits his PRs, fixing CI issues and auto-rebasing. Another keeps CI healthy by catching flaky tests. The beauty is in the simplicity: it is just scheduled Claude Code sessions that run autonomously.

## Managing at Scale

There are a few ways to manage work at this scale. One approach is asking Claude to use a bunch of sub-agents to distribute work across a problem. But the loop pattern has become his go-to because it is the simplest thing that works -- just cron jobs triggering Claude Code sessions that handle ongoing maintenance tasks without human intervention.

## Key Takeaways

- The creator of Claude Code runs 5-10 sessions simultaneously with hundreds of agents and thousands of nightly sub-agents
- The `/loop` pattern uses cron to schedule repeating Claude Code sessions for autonomous maintenance
- Practical loop uses include babysitting PRs, fixing CI, auto-rebasing, and catching flaky tests
- The most effective patterns tend to be the simplest -- cron-scheduled sessions beat complex orchestration
- Sub-agents are best suited for deeper, overnight work that does not require immediate feedback

## Resources

- [Claude Code](https://docs.anthropic.com/en/docs/claude-code) -- Anthropic's CLI tool for working with Claude
- [Boris Cherny on Anthropic](https://www.anthropic.com) -- Creator of Claude Code at Anthropic
