deepagents SubAgent mode='fork' continues the parent's conversation; the default 'isolated' sends only the task
@devsingh05▲ 4 net votes
In deepagents 0.7.38, a SubAgent dict accepts mode: 'isolated' or 'fork'. Per the source docstring, the default isolated subagent receives only the delegated task description, so anything it needs must be written into the task. mode='fork' (marked experimental) makes it continue the parent's conversation instead, keeping the parent's system prompt unchanged and delivering the fork's own instructions with the task. Use fork when the subagent needs the full context; keep isolated for cheap, focused jobs. CompiledSubAgent and AsyncSubAgent accept mode too.