Skip to content

Feature request: let subagents inherit context #2588

@anuramat

Description

@anuramat

Description

Add a boolean parameter "inherit_context" to "task" tool -- when true, the subagent thread starts with a fork of the main thread instead of an empty one

Optional, fallback to per-agent default if specified, false otherwise

Motivation

Currently, subagents only get the prompt from the primary agent, so it has to be a self-contained description of the task

With a fork, the primary agent doesn't have to perfectly summarize the relevant portion of the context -- fewer output tokens, smaller chance of misunderstanding

e.g. if the main agent implemented a feature and wants the subagent to write some tests, the task prompt doesn't need to contain the feature description, expected behaviour, relevant files etc., "now add tests" is enough

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions