I spent a couple of weekends experimenting with context engineering and Claude Code sub-agents to build a personal project: a fairly custom app with very specific business rules, several modules, roles, permissions, and the kind of architecture that gets complex quickly.
I tried vibe coding first. It failed. These tools work well for simple apps, the classic to-do list you generate in a single prompt, but the moment things get serious you hit the limits fast.
So I went and did the reading. I went through Anthropic's articles on context engineering and sub-agents, watched a few videos (in English, because there is not much out there beyond the usual "how I built my app in an hour with vibe coding"), and started iterating with that in mind. Feature by feature, tuning the prompts, optimizing the context, the agents, and the MCPs.
The result:
- Fewer bugs in the code
- Fewer hallucinations
- More consistent output
- A cleaner architecture
Along the way I posted a screenshot I found funny: four sub-agents running in parallel. That little screenshot led to two real lessons.
First, each agent was loading 40k to 50k tokens of context. Each one. My daily limit evaporated. That forced me to get serious about trimming context and scoping each agent's tools.
Second, someone messaged me asking how I had done it. I had not done anything special, the framework just allows it naturally, but it made me think that if one person was curious, it was worth documenting the whole thing.
So I did. I put it all in a GitHub repo, with a step-by-step guide, the templates, and the instructions to reproduce the sub-agent setup. If the topic interests you, it is worth a look.
The takeaway is simple. The leverage is not in typing a clever prompt and hoping. It is in engineering the context the model works inside.