{"id":1365,"date":"2026-06-09T12:00:33","date_gmt":"2026-06-09T10:00:33","guid":{"rendered":"https:\/\/pletzenauer.com\/2026\/06\/09\/claude-code-sub-agents\/"},"modified":"2026-08-22T01:07:27","modified_gmt":"2026-08-21T23:07:27","slug":"claude-code-sub-agents","status":"publish","type":"post","link":"https:\/\/pletzenauer.com\/en\/2026\/06\/09\/claude-code-sub-agents\/","title":{"rendered":"Sub-agents in Claude Code: when they are worth it, and when not"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Think of Claude Code as a consultant with a small team. You only ever talk to the consultant. He hands subtasks to specialists and reports the result back to you at the end.<\/p>\n\n<p class=\"wp-block-paragraph\">That is exactly what sub-agents are. Not hype, but a practical way to divide up work. This post shows when they are worth it, and when they are not.<\/p>\n\n<figure class=\"wp-block-image size-large\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1920\" height=\"1264\" src=\"https:\/\/pletzenauer.com\/wp-content\/uploads\/2026\/06\/en-infographic-sub-agents.png\" alt=\"Diagram: a main session acting as orchestrator delegates to three sub-agents (research, code review, tests), each with its own model and a fresh context.\" class=\"wp-image-3210\" srcset=\"https:\/\/pletzenauer.com\/wp-content\/uploads\/2026\/06\/en-infographic-sub-agents.png 1920w, https:\/\/pletzenauer.com\/wp-content\/uploads\/2026\/06\/en-infographic-sub-agents-300x198.png 300w, https:\/\/pletzenauer.com\/wp-content\/uploads\/2026\/06\/en-infographic-sub-agents-1024x674.png 1024w, https:\/\/pletzenauer.com\/wp-content\/uploads\/2026\/06\/en-infographic-sub-agents-768x506.png 768w, https:\/\/pletzenauer.com\/wp-content\/uploads\/2026\/06\/en-infographic-sub-agents-1536x1011.png 1536w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/><figcaption class=\"wp-element-caption\">The main session orchestrates, the sub-agents do the work.<\/figcaption><\/figure>\n\n<h2 class=\"wp-block-heading\">What a sub-agent is<\/h2>\n\n<p class=\"wp-block-paragraph\">The main session is the orchestrator. It is the instance you talk to. It starts independent sub-agents and assigns them tasks.<\/p>\n\n<p class=\"wp-block-paragraph\">Each sub-agent works in its own fresh context. It reports back only a compact result. Sub-agents talk to the main session, never to each other.<\/p>\n\n<h2 class=\"wp-block-heading\">Why they are worth it<\/h2>\n\n<p class=\"wp-block-paragraph\">Four reasons make sub-agents useful.<\/p>\n\n<ul class=\"wp-block-list\"><li><strong>A clean context.<\/strong> Research, long logs and large reports stay out of the main chat.<\/li><li><strong>Parallel work.<\/strong> Many independent tasks run at the same time instead of one after another.<\/li><li><strong>Cheaper models.<\/strong> A small model does the legwork, a strong one runs the show.<\/li><li><strong>Honest reviews.<\/strong> A fresh agent has not been primed to agree with you.<\/li><\/ul>\n\n<h2 class=\"wp-block-heading\">Built in or built yourself<\/h2>\n\n<p class=\"wp-block-paragraph\">Claude Code ships with generic sub-agents. Alongside them you build your own, specialized ones. A sub-agent is nothing more than a Markdown file.<\/p>\n\n<p class=\"wp-block-paragraph\">At the top sits the YAML front matter: name, description, model and permitted tools. The description is the most important lever. It decides whether the agent gets matched to the task.<\/p>\n\n<p class=\"wp-block-paragraph\">A common mistake in practice is a forgotten quotation mark. The structure breaks, and the agent never starts.<\/p>\n\n<h2 class=\"wp-block-heading\">Project or global<\/h2>\n\n<p class=\"wp-block-paragraph\">Project agents live in the repository and travel with it. Global agents live in your user folder and belong to you alone.<\/p>\n\n<p class=\"wp-block-paragraph\">Rule of thumb: if the team should use it, it belongs in the project. Moving it is trivial, because it is only a file.<\/p>\n\n<h2 class=\"wp-block-heading\">When a sub-agent, and when not<\/h2>\n\n<p class=\"wp-block-paragraph\">Not every task needs a sub-agent. Too many of them often produce worse results. One simple question helps.<\/p>\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>Is this about to dump a mountain of information into my chat that I will never read again? If yes, delegate. If no, it stays in the main session.<\/p><\/blockquote>\n\n<p class=\"wp-block-paragraph\">Use sub-agents when a lot of files have to be read, when jobs can run in parallel, or when you want an unbiased review.<\/p>\n\n<p class=\"wp-block-paragraph\">Skip them for small edits, for steps that depend on one another, or when the agent would need to ask you a question.<\/p>\n\n<h2 class=\"wp-block-heading\">Dynamic workflows and \u201cultra code\u201d<\/h2>\n\n<p class=\"wp-block-paragraph\">Since Opus 4.8 there are dynamic workflows. The main session then starts many sub-agents in parallel on its own. That is powerful, but it burns through your session limit fast.<\/p>\n\n<p class=\"wp-block-paragraph\">That is why the trigger word was changed from \u201cworkflow\u201d to \u201cultra code\u201d. No large workflow now starts by accident. Reach for the tool deliberately.<\/p>\n\n<h2 class=\"wp-block-heading\">Take permissions seriously<\/h2>\n\n<p class=\"wp-block-paragraph\">If an agent can read or change data, you have to assume it will do so at some point. So grant only the tools it genuinely needs.<\/p>\n\n<p class=\"wp-block-paragraph\">For research and review agents that usually means read-only. With agent files from other people, check for possible prompt injection first.<\/p>\n\n<h2 class=\"wp-block-heading\">My promise to you<\/h2>\n\n<p class=\"wp-block-paragraph\">Sub-agents are not an end in themselves. They are a tool for dividing up work. The gain is less noise in the chat, lower cost and an unbiased look at your work.<\/p>\n\n<p class=\"wp-block-paragraph\">My promise to you: I recommend sub-agents only where they measurably help.<\/p>\n\n<p class=\"wp-block-paragraph\"><em>Note: this post summarizes the core ideas of an English-language YouTube video on Claude Code sub-agents and puts them in a consulting context. Source: <a href=\"https:\/\/www.youtube.com\/watch?v=e18sdZLwP7o\" rel=\"noopener\">youtube.com\/watch?v=e18sdZLwP7o<\/a>.<\/em><\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>Sub-agents divide up the work: a clean context, parallel jobs, cheaper models and honest reviews. When they are worth it, and when they are not.<\/p>\n","protected":false},"author":1,"featured_media":3210,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-1365","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-automatisierung"],"_links":{"self":[{"href":"https:\/\/pletzenauer.com\/en\/wp-json\/wp\/v2\/posts\/1365","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pletzenauer.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pletzenauer.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pletzenauer.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pletzenauer.com\/en\/wp-json\/wp\/v2\/comments?post=1365"}],"version-history":[{"count":7,"href":"https:\/\/pletzenauer.com\/en\/wp-json\/wp\/v2\/posts\/1365\/revisions"}],"predecessor-version":[{"id":3296,"href":"https:\/\/pletzenauer.com\/en\/wp-json\/wp\/v2\/posts\/1365\/revisions\/3296"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/pletzenauer.com\/en\/wp-json\/wp\/v2\/media\/3210"}],"wp:attachment":[{"href":"https:\/\/pletzenauer.com\/en\/wp-json\/wp\/v2\/media?parent=1365"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pletzenauer.com\/en\/wp-json\/wp\/v2\/categories?post=1365"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pletzenauer.com\/en\/wp-json\/wp\/v2\/tags?post=1365"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}