Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
When subagent delegation is enabled and subagent_delegation_context is injected (e.g. “delegate to ui-components”), the main agent does not have the Task tool in its toolset. Any attempt to delegate (e.g. “use the ui-components subagent” or “delegate to ui-components”) results in “Tool not found: Task”.
Expected: The agent should be able to call Task(subagent_type=“ui-components”, prompt=“…”) to delegate to custom subagents defined in ~/.cursor/agents/ (e.g. ui-components.md).
Actual: The Task tool is never available to the agent. The delegation context is injected (user has “delegate to ui-components” enabled), but the Task tool itself is not attached to the agent’s tools.
Environment:
- Cursor 2.5.17 (user setup), Windows 10, Stable, Default track
- Privacy Mode: disabled (tried with Share Data to rule out privacy-related issue)
- Custom subagent: ~/.cursor/agents/ui-components.md with valid frontmatter (name, description)
Request ID: [הדבק כאן את ה-Request ID שתעתיק מהשיחה]
Steps to Reproduce
- Define a custom subagent in ~/.cursor/agents/ (e.g. ui-components.md) with valid YAML frontmatter (name, description).
- In Cursor Settings, enable delegation to that subagent (e.g. “delegate to ui-components”). Ensure Privacy Mode is off.
- Open a new Agent conversation in the project.
- Ask the agent to delegate to the subagent (e.g. “use the ui-components subagent for [task]” or “delegate to ui-components”).
- Observe: the agent responds with “Tool not found: Task” because the Task tool is not in its toolset, even though subagent_delegation_context was injected.
Expected Behavior
The main agent should have the Task tool available whenever subagent_delegation_context is injected. The agent should be able to call Task(subagent_type=“ui-components”, prompt=“…”) and the subagent should run in its own context. Custom subagents in ~/.cursor/agents/*.md should be discoverable and invokable by the main agent.
Operating System
Windows 10/11
Version Information
Cursor IDE 2.5.17 (user setup)
VSCode Version: 1.105.1
Commit: 7b98dcb824ea96c9c62362a5e80dbf0d1aae4770
Date: 2026-02-17T05:58:33.110Z
Build Type: Stable
Release Track: Default
OS: Windows_NT x64 10.0.26200
For AI issues: which model did you use?
COMPOSER & AUTO
For AI issues: add Request ID with privacy disabled
bbfabed6-438b-415b-b98a-c041f97d66c3
Additional Information
Custom subagent file: ~/.cursor/agents/ui-components.md (user-level). Subagent delegation is enabled in settings; subagent_delegation_context is injected into the prompt with “ui-components”. The agent receives the delegation instruction but the Task tool is never added to its available tools. Same behavior with Privacy Mode off. Related forum threads: Task Tool Missing for Custom Agents (149771), Sub-agent task broken in 2.4.22 (150210).
Does this stop you from using Cursor
No - Cursor works, but with this issue