Introducing Custom Agents

*What are custom agents and why do they matter?* General-purpose coding assistants are great, but they suffer from two major limitations: Lack of Specialization: A general-purpose assistant doesnāt know your specific projectās testing conventions or dependency management rules unless you explain them every single time. Context Window Bloat: Loading a massive, monolithic prompt containing all your coding guidelines, linters, and testing rules into every single chat turns into a token budget disaster. Custom agents solve this. They are specialized, file-based configurations that define a particular role with its own scoped instructions, tools, and constraints. This keeps your active context clean, minimizes token overhead, and gives you a predictable partner for specific tasks. Now, you might have read this and thought: arenāt these issues addressed by skills and dynamic subagents? To a large degree, yes! Custom agents donāt replace skills and dynamic subagents; they simply provide even more customizability for another level of optimization: Skills specialize a custom agent by providing additional context and domain instructions. Through progressive discovery, skills help address context window bloat by omitting complete instructions from the prompt by default until needed. Instead, we let the agent determine whether the full skill should be read given the work at hand. But, if you think about the full set of skills you need across all tasks that you may do, that is still a very large list and the descriptions themselves will take a lot of context. Custom agents let you specify the subset of skills that are actually relevant for the specialization at hand. The same extends to MCP servers, hooks, and other existing customization points. And then on top of that, custom agents let you also customize the system instruction, default tools, and other more ācoreā parts of the agent loop. We introduced dynamic subagents a couple of months ago, and they also help along these axes by letting the main agent delegate some work to a subagent to not pollute the main agentās context. The ādynamicā part is that the main agent can specify the prompt that it sends to the subagent. With custom agents, we take this one step further by allowing the main agent to delegate to a custom agent, with its specific customizations as discussed earlier, but also potentially other details like model and permissions.