I wanted to understand subagents, so I had Claude Code write standup comedy and workshop it with three AI audience members
When I first heard about Claude Code's subagents, my imagination ran ahead of me. To stay grounded, I decided to take apart Claude Code and watch the process firsthand (similar to how I watched it do compaction).
Subagents are the equivalent of you opening additional side chats while using ChatGPT.
Say you’re in a ChatGPT conversation (e.g. plan a surf trip), but you need to research something on the side (e.g. what wetsuit am I ok with). You don’t want to derail the main thread, so you open a new tab, ask your question there, get an answer, then bring just the bottom line back to your original conversation.
That’s a subagent. When Anthropic built “subagents” into Claude Code, they automated that plumbing. (If this sounds a lot like calling a tool, you're right. Manus calls this "agent-as-a-tool")
“Fresh side chats” are valuable for two reasons:
Keep side quests from polluting the main agent context window (e.g. you just need the answer, not the research/discussion that got there)
Get a fresh pair of eyes. If you want code review, or an eval, or a second opinion, you don’t want the same context window that came up with the answer to also judge it. (Zevi Arnovitz did this manually long before it was a feature.)
My plan was to have Claude Code spawn subagents, then observe it closely. Spoiler alert: it’s all text files and context windows.
To give Claude Code a reason to spawn subagents, I created a comedy writing skill (a “skill” is a saved prompt) that tells Claude Code to write a joke, then spawn three audience members to react to it.
While Claude Code ran, I watched from two camera angles:
The terminal, where I could see it spawn a “writer” subagent, then three “audience” subagents
The actual files on my computer where Claude Code stores its memory.
That second part is what demystified it for me. I navigated to the hidden ~/.claude/projects folder and watched Claude Code create:
A main thread (the comedy club?)
A comedy writer subagent
Three audience subagents
Another comedy writer subagent to act on their feedback.
Even though these look like scary “JSONL” files, they’re just text files containing chat history, that are human-readable if you open them with this prettifier extension.
Watching the files appear in real time made it click for me. Before this, “subagents” sounded like something sophisticated I was missing. Now I see it’s just chat threads spawning chat threads.
I recommend taking apart Claude Code while we still can. It helps to see that subagents aren’t magic: they’re just opening another chat thread, getting an answer, and bringing just the bottom line back into the main thread.
In other words, text files all the way down.



Nice read!