Skip to content

Limit Subagent Tree Depth #2906

Closed as not planned
Closed as not planned

Description

@garrett-hopper

I'd like to be able to limit subagents from creating further subagents too deeply. Often I'll find them creating a deeply nested tree which usually means they're duplicating work that was done higher in the tree, or at the very least should be orchestrated by the parent agent explicitly instead of the subagent deciding to "analyze this github repo" on its own which in turn creates its own set of recursive trees.
Perhaps a default limit of 2-3 would make sense. In my experience, once it goes any further than that, it's usually an indication of a problem.

It'd be easier to catch these kinds of issues if sub-sub-agents were visualized. Currently only the initial call to the subagent is shown; ideally nested tool calls under that agent would be visually shown and indented to make it clear what's actively being done without having to switch to that agent's session.

Activity

  1. github-actions commented on Oct 1, 2025

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  2. rekram1-node commented on Oct 2, 2025

    @rekram1-node
    Collaborator

    yeah that makes sense

  3. anis-dr commented on Mar 9, 2026

    @anis-dr

    This is actually a problem, GPT 5.4 especially loves to delegate work to subagents and it never stops.

  4. github-actions commented on May 9, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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