---
title: "VB-01 First Steps with Sub-agents in Claude Code"
url: "https://zuey.me/articles/vb-01-nhung-buoc-dau-su-dung-sub-agents-trong-claude-code?lang=en"
locale: en
access: members
full_text: false
published_at: "2025-07-29T03:26:10.000Z"
tags: ["Claude Code", "Vibe Coding", "AI", "SaaS", "Startup"]
translations:
  vi: "https://zuey.me/articles/vb-01-nhung-buoc-dau-su-dung-sub-agents-trong-claude-code.md?lang=vi"
  zh: "https://zuey.me/articles/vb-01-nhung-buoc-dau-su-dung-sub-agents-trong-claude-code.md?lang=zh"
  ko: "https://zuey.me/articles/vb-01-nhung-buoc-dau-su-dung-sub-agents-trong-claude-code.md?lang=ko"
  ja: "https://zuey.me/articles/vb-01-nhung-buoc-dau-su-dung-sub-agents-trong-claude-code.md?lang=ja"
---
# VB-01 First Steps with Sub-agents in Claude Code

> Sub-agents in Claude Code are powerful, but get them wrong and they burn tokens and crawl. How the information flow really works, 2 mistakes I made, and when you DON'T need sub-agents.

> **INFO:** Post 01 in the **“Vibe-coding with Claude Code”** series.

I plan to document and share everything I learn using Claude Code while “vibe coding” the DevPocket.app app! (I call it “vibe coding” because I just focus on giving orders and barely review the code anymore. No idea if anything will actually come out of it 😂)

![VB-01 First Steps with Sub-agents in Claude Code](https://media.zuey.me/blog/2025/1d7ea7f8-5a366d10-c55b-4e89-a8be-d78b0828ca1f-1-105-c.jpeg)

Today we'll walk through the first steps of using Claude Code's Sub-agents: your very own army of agents, each one specialized in a different task.

It's a really powerful Claude feature, but as I said in my previous post, actually getting the most out of it is far from simple. In this post, we'll dissect how to build effective sub-agents and avoid the most common mistakes, based on my own experience.

**(*) Bonus: there are important side notes at the end of the post! 😜**

---

### 1. How do Sub-agents work? Understanding the information flow

This is the most important part, and one a lot of people skip or simply don't know about (me included hehe).

![VB-01 First Steps with Sub-agents in Claude Code](https://media.zuey.me/blog/2025/ac300acf-cleanshot-2025-08-03-at-22-49-05-2x.png)

**Sub-agents don't talk straight to you. It's a chain of delegation:**

1. **You** give an order (prompt) to the **Main Agent**.
2. Based on your order, the **Main Agent** decides which **Sub-agents** fit and gives them orders.
3. The **Sub-agents** work independently to carry out the task.
4. When done, the **Sub-agents** report the results back to the **Main Agent**.
5. Finally, the **Main Agent** pulls everything together and reports back to **you**.

```mermaid
flowchart LR
  U["You"] -->|"prompt"| M["Main Agent"]
  M -->|"assigns task"| S1["Sub-agent A"]
  M -->|"assigns task"| S2["Sub-agent B"]
  S1 -->|"reports back"| M
  S2 -->|"reports back"| M
  M -->|"summarizes results"| U
```

*The delegation chain: sub-agents only talk to the Main Agent*

> **INFO:** 👉 **Key point:** A sub-agent doesn't talk to you, it talks to the **Main Agent**. Get this wrong and you'll write the wrong prompts, build the wrong workflows and never get the results you want.

![VB-01 First Steps with Sub-agents in Claude Code](https://media.zuey.me/blog/2025/a5d35a72-4eb54e32-1aff-447c-93c6-3ee351fd2100.png)

When I first tried it, I happily created 2-3 agents, but no matter how I prompted, not a single one got summoned. Turns out you need to create a main agent first (like a team leader), then write a system prompt so you can summon it and hand it work, and it then delegates down to the agents on the team.

---

*Phần còn lại dành cho thành viên có quyền đọc toàn bài (Knowledges, Kết hợp, Cộng đồng) — see plans at https://zuey.me/pricing*
