Skip to main content

write_subagents_json

Function write_subagents_json 

Source
pub fn write_subagents_json(compose: &Compose, h: AgentHandle<'_>) -> Result<()>
Expand description

Write (or clear) the per-agent --agents JSON file. Mirrors write_role_prompt_concat: the scoped + full render paths both call it so a subagents: edit flows into the agent at the next render. When the agent declares no sub-agents (or isn’t claude-code) the file is removed if present, so a stale --agents set never lingers across a reload that dropped them.