FAQ
The Cloud Code sub-agent feature allows Cloud Code to assign tasks to sub-agents, which can perform specific operations like scanning codebases and summarizing research reports. This helps in efficient context management and reduces token consumption.
The sub-agent concept was introduced to optimize context management and token usage in Cloud Code. It helps in handling large context windows by summarizing actions and reducing the need to retain extensive conversation histories.
Common issues include sub-agents feeling slow, consuming more tokens, and not contributing effectively to better results. These issues often arise when sub-agents are used for direct implementation rather than research and planning.
Performance can be improved by using sub-agents primarily for research and planning rather than direct implementation. Ensuring they retrieve and summarize relevant information before updating context files also enhances efficiency.
The best practice is to treat sub-agents as researchers, focusing on planning and information retrieval. They should provide summaries to guide the main agent, rather than handling direct implementation tasks.
Cloud Code uses a file system to manage context. Sub-agents save research and implementation plans in local files, which can be retrieved later, ensuring that all agents have access to the necessary context.
Specialized sub-agents are equipped with specific knowledge and tools related to certain services or technologies, such as Vercel AI SDK or Stripe. They help in planning and retrieving relevant information for implementation.
The file system allows agents to save results and context in local files, reducing the need to store extensive conversation history. This makes context retrieval more efficient and helps maintain continuity across tasks.
In the future, better context sharing across different agents is expected to be developed, allowing all agents to be on the same page about tasks and previous actions performed by other agents.
Sub-agents can be customized by including important documentation in their system prompts and attaching specialized tools for context retrieval, ensuring they follow the latest practices and effectively contribute to specific projects.




















Comments