Skip to content

delegate_task blocks agent during wait — breaks coordinator pattern #11508

@AppleLV918

Description

@AppleLV918

The delegate_task tool is synchronous-only. When an agent calls it, the agent is blocked until the sub-agent completes. This breaks the coordinator pattern — a core use case where an agent acts as a task router:

1. Coordinator receives a task from user
2. Coordinator delegates to sub-agent(s)
3. Coordinator immediately returns to **available state** — ready to receive new messages from user
4. User can send follow-up instructions while sub-agents work
5. Sub-agents complete → coordinator reports back

Currently, step 3 is impossible. While the coordinator waits on `delegate_task`, user messages are blocked. This makes the coordinator unusable for real multi-task workflows.

## Proposed Solution

Add `async_mode=True` to `delegate_task`:
- Returns immediately with a `task_id`
- Sub-agent runs in background
- Coordinator stays free to receive messages
- Backwards compatible (sync remains default)

## Alternative

Add `busy_input_mode: queue` — messages during busy state are queued and delivered when agent is free.

## Why This Matters

Without a coordinator pattern, every task must be handled in a single conversation turn. For task routing, delegation, and cross-session continuity, this is a fundamental limitation.
```

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low — cosmetic, nice to havetool/delegateSubagent delegationtype/featureNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions