YouTube2Text

Claude Code Subagents: Keep Your Context Clean — Transcript

by AgentCodeAcademy · 486 words · 82 segments · language en · Watch on YouTube

Full transcript

  1. 0:00What if Claude could hand off work to a
  2. 0:02helper without cluttering your
  3. 0:04conversation? That's what sub-agents do.
  4. 0:10Here's the problem. Every file Claude
  5. 0:13reads, every search result, and every
  6. 0:15long test log fills your conversation's
  7. 0:18context. The more clutter, the less room
  8. 0:21for the work that matters.
  9. 0:30A sub-agent is a specialized AI
  10. 0:32assistant with its own context window,
  11. 0:35its own system prompt, and its own tools
  12. 0:38and permissions. Claude hands it a task,
  13. 0:41it works independently, and only a
  14. 0:44summary comes back.
  15. 0:50Claude Code already includes built-in
  16. 0:52sub-agents. Explore is a fast, read-only
  17. 0:56agent for searching your code base. Plan
  18. 0:59researches during plan mode, and
  19. 1:01general-purpose handles complex,
  20. 1:03multi-step tasks.
  21. 1:10Sub-agents help you preserve context,
  22. 1:12enforce limits on tools, specialize
  23. 1:15behavior, and control costs by routing
  24. 1:18simple tasks to faster models.
  25. 1:26Let's build one for our bookstore API, a
  26. 1:29code reviewer. The easiest way is to
  27. 1:32just ask Claude to create it and say
  28. 1:34where to save it.
  29. 1:44Claude writes a markdown file with front
  30. 1:46matter, a name, a description that tells
  31. 1:49Claude when to delegate, a tools list
  32. 1:52with no edit or write, so it's
  33. 1:54read-only, and a model. The body is its
  34. 1:57system prompt, what to check and how to
  35. 2:00report.
  36. 2:08Now, I ask Claude to use the code
  37. 2:10reviewer on my changes. It runs in its
  38. 2:13own context, reads the diff in the
  39. 2:15files, and returns a short, prioritized
  40. 2:19report. My main conversation only gets
  41. 2:22the summary.
  42. 2:32There are three ways to call a sub
  43. 2:34agent. Name it in your prompt, at
  44. 2:36mention it to guarantee it runs, or
  45. 2:39start a whole session as that agent with
  46. 2:41{dash} {dash} agent.
  47. 2:50Example two, noisy test runs. Ask Claude
  48. 2:54to use a sub agent to run the tests and
  49. 2:56report only failures. Hundreds of log
  50. 2:59lines stay in the sub agent. Your
  51. 3:01conversation gets one clear line.
  52. 3:12You can also run independent research in
  53. 3:14parallel or chain sub agents. A reviewer
  54. 3:18finds issues, then another fixes them.
  55. 3:21Just remember, each sub agent uses
  56. 3:23tokens, and its results come back to
  57. 3:26your conversation.
  58. 3:30To keep sub agents focused, restrict
  59. 3:32their tools and pick a model. A simple
  60. 3:35research agent can run on Haiku to save
  61. 3:38cost.
  62. 3:44Project sub agents live in {dot} Claude
  63. 3:46{slash} agents, so commit them for your
  64. 3:49team.
  65. 3:50Personal ones go in your home folder's
  66. 3:52{dot} Claude {slash} agents.
  67. 3:58When should you use one? Use a sub agent
  68. 4:00for noisy, self-contained work with
  69. 4:03clear limits. Stay in the main
  70. 4:05conversation for back-and-forth work and
  71. 4:08quick changes.
  72. 4:16Best practices: one job per sub agent, a
  73. 4:19description that clearly says when to
  74. 4:21use it, and only the tools it needs.
  75. 4:30Recap: Claude.md for facts, skills for
  76. 4:34procedures, hooks for guarantees, and
  77. 4:36sub agents for focused work in a
  78. 4:38separate context.
  79. 4:40Next episode: MCP, connecting Claude
  80. 4:43code to your tools and data.
  81. 4:50If this helped, hit like, share it with
  82. 4:52your team, and subscribe.

About this transcript

This page contains the full transcript of Claude Code Subagents: Keep Your Context Clean by AgentCodeAcademy, generated from the public captions YouTube serves with the video. The transcript has 486 words across 82 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.