{"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-06-10T20:17:08","modified_gmt":"2026-06-10T18:17:08","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 \u2014 and when not"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Picture Claude Code as a consultant with a small team. You only talk to the consultant. He hands subtasks to specialists and reports the result back to you at the end.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That is exactly what Sub-Agents are. Not hype, but a practical tool for division of labour. This post shows when they are worth it \u2014 and when not.<\/p>\n\n\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\/infographic-sub-agents.png\" alt=\"Diagram: one main session as orchestrator delegates to three Sub-Agents (research, code review, tests), each with its own model and fresh context.\" class=\"wp-image-1343\" srcset=\"https:\/\/pletzenauer.com\/wp-content\/uploads\/2026\/06\/infographic-sub-agents.png 1920w, https:\/\/pletzenauer.com\/wp-content\/uploads\/2026\/06\/infographic-sub-agents-300x198.png 300w, https:\/\/pletzenauer.com\/wp-content\/uploads\/2026\/06\/infographic-sub-agents-1024x674.png 1024w, https:\/\/pletzenauer.com\/wp-content\/uploads\/2026\/06\/infographic-sub-agents-768x506.png 768w, https:\/\/pletzenauer.com\/wp-content\/uploads\/2026\/06\/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\n\n<h2 class=\"wp-block-heading\">What a Sub-Agent is<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The main session is the orchestrator. That is the instance you talk to. It starts independent Sub-Agents and assigns tasks to them.<\/p>\n\n\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\n\n<h2 class=\"wp-block-heading\">Why they are worth it<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Four reasons make Sub-Agents useful.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>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 stays in charge.<\/li><li><strong>Honest reviews.<\/strong> A fresh agent is not conditioned to agree with you.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Built in or self-built<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Claude Code ships with generic Sub-Agents. Alongside them you build your own, specialised agents. A Sub-Agent is nothing more than a Markdown file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">At the top sits the YAML frontmatter: name, description, model and allowed tools. The description is the most important lever. It decides whether the agent fits the task.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A common mistake in practice is a forgotten quotation mark. Then the structure breaks, and the agent never starts.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Project or global<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Project-scoped agents live in the repo and travel with it. Global agents live in your user folder and belong only to you.<\/p>\n\n\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 just one file.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">When a Sub-Agent \u2014 and when not<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Not every task needs a Sub-Agent. Too many often lead to worse results. A simple question helps.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>Will this 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\n\n<p class=\"wp-block-paragraph\">Use Sub-Agents when many files are read, when jobs run in parallel, or when you want an unbiased review.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Skip them for small changes, for steps that depend on each other, or when the agent would have to ask a follow-up question.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Dynamic workflows and \u201eultra code\u201c<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Since Opus 4.8 there are dynamic workflows. The main session then automatically starts many Sub-Agents in parallel. That is powerful, but it burns through your session limit fast.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That is why the trigger word was changed from \u201eworkflow\u201c to \u201eultra code\u201c. So no large workflow starts by accident. Use the tool deliberately.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Take permissions seriously<\/h2>\n\n\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 really needs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For research and review agents that usually means: read only. With third-party agent files, check for possible prompt injections beforehand.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">My promise to you<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Sub-Agents are not an end in themselves. They are a tool for division of labour. The gain is less noise in the chat, lower costs and an unbiased look at your work.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">My promise to you: I recommend Sub-Agents only where they measurably help. Automation is more than AI hype.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Note: This post summarises the core ideas of an English-language YouTube video on Claude Code Sub-Agents and places 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 teilen Arbeit auf: sauberer Kontext, parallele Jobs, g\u00fcnstige Modelle und ehrliche Reviews. Wann sie sich lohnen \u2014 und wann nicht.<\/p>\n","protected":false},"author":1,"featured_media":1343,"comment_status":"closed","ping_status":"open","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":2,"href":"https:\/\/pletzenauer.com\/en\/wp-json\/wp\/v2\/posts\/1365\/revisions"}],"predecessor-version":[{"id":1404,"href":"https:\/\/pletzenauer.com\/en\/wp-json\/wp\/v2\/posts\/1365\/revisions\/1404"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/pletzenauer.com\/en\/wp-json\/wp\/v2\/media\/1343"}],"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}]}}