modern-fireman-99755
04/02/2026, 1:58 PMopenhands.tools has two tools for this: DelegationTool and TaskToolSet.
Why are there two tools, and how do they differ?
DelegationTool is the older version, while TaskToolSet is the newer one. Both accomplish the same thing but in different ways (they have different underlying architectures). The architecture of TaskToolSet is very similar to the one CC is using.
┌─────────────────────┬────────────────────────────────────────────┬────────────────────────────────────────────┐
│ Aspect │ DelegateTool │ TaskToolSet │
├─────────────────────┼────────────────────────────────────────────┼────────────────────────────────────────────┤
│ Philosophy │ Pool of named workers you manage │ On-demand task execution │
│ Commands │ Two-phase: spawn then delegate │ Single task command │
│ Agent Identification│ User-defined string IDs ("research") │ Auto-generated IDs ("task_00000001") │
│ Agent Creation │ Explicit spawn with ids & agent_types │ Implicit — agent created per task │
│ Task Assignment │ Dict mapping: {"id1":"task..."} │ Single: prompt="...", subagent_type="..." │
│ Parallelism │ Native — multiple tasks run in parallel │ Sequential per call, LLM can multi-invoke │
│ Sub-agent Persist. │ Long-lived across multiple delegate calls │ Per-task — evicted after completion │
│ Resume Support │ Implicit — same ID reuses conversation │ Explicit — resume="task_00000001" │
│ State Management │ Stateful pool in _sub_agents dict │ TaskManager evicts after completion │
│ Confirmation │ confirmation_handler callback │ confirmation_handler callback │
│ Visualizer │ Yes — create_sub_visualizer() │ Yes — create_sub_visualizer() │
│ Metrics Tracking │ Synced under delegate:{agent_id} │ Synced under task:{task_id} │
│ Persistence Dir │ Inherits under subagents/ │ Inherits under subagents/ or temp dir │
│ Complexity │ Higher (spawn + delegate workflow) │ Lower (single call) |
│ Control │ More explicit │ More automated │
└─────────────────────┴────────────────────────────────────────────┴────────────────────────────────────────────┘
I will recommend using the TaskToolSet because:
• It has been evaluated against five benchmarks, meaning we have iterated on it to fix bugs and ensure it works well with the main agent.
• The Tool API is simpler: It requires only a single call to create and run a task.
• If we want to implement background sub-agents, the TaskToolSet already has the necessary architecture.
• Parallelism: While not as "native" as DelegationTool, the LLM can invoke multiple task tools in parallel, which covers most use cases.wide-doctor-37830
04/02/2026, 2:01 PMlimited-student-10747
04/02/2026, 2:06 PMmodern-fireman-99755
04/02/2026, 2:13 PMIs there a good way to direct the agent to use one tool over the other?Just give one tool to the agent, not both.
And is there any reason to keep DelegationTool?There is just one problem: the CLI already provides the
DelegationTool to the agent. If we delete it or replace it with TaskToolSet, we will run into backward-compatibility issues with persisted conversations. Currently, our system allows us to add tools, but not to replace or delete them. However, I believe we can find a strategy to work around this.chilly-france-44439
04/02/2026, 2:14 PMcalm-artist-7206
04/02/2026, 2:14 PMcalm-artist-7206
04/02/2026, 2:15 PMcalm-artist-7206
04/02/2026, 2:15 PMcalm-artist-7206
04/02/2026, 2:17 PMundo from file_editor tool. It's not the full tool, but the undo command, but it does mean that conversations histories have it
https://github.com/OpenHands/software-agent-sdk/pull/2064limited-student-10747
04/02/2026, 2:18 PMcalm-artist-7206
04/02/2026, 2:18 PMmodern-fireman-99755
04/02/2026, 2:23 PMcalm-artist-7206
04/02/2026, 2:27 PMlimited-student-10747
04/02/2026, 2:29 PMmodern-fireman-99755
04/02/2026, 2:37 PMDelegateTool with TaskToolSet for the main agent.
• OpenHands/OpenHands-CLI: Ensure backward compatibility for persisted conversations with the new tool (as explained in Slack).
• OpenHands/software-agent-sdk: Deprecate the DelegateTool.
• OpenHands/software-agent-sdk: Research strategies for updating the toolset while maintaining backward compatibility with persisted sessions (e.g., look into Codex and Claude Code implementations).nutritious-balloon-65098
04/02/2026, 2:38 PMnutritious-balloon-65098
04/02/2026, 2:40 PMDelegateTool with TaskToolSet | ✅ Created | [#634](https://github.com/OpenHands/OpenHands-CLI/issues/634) |
| OpenHands/OpenHands-CLI: Ensure backward compatibility for persisted conversations | ✅ Created | [#635](https://github.com/OpenHands/OpenHands-CLI/issues/635) |
| OpenHands/software-agent-sdk: Deprecate the DelegateTool | ✅ Created | [#2666](https://github.com/OpenHands/software-agent-sdk/issues/2666) |
| OpenHands/software-agent-sdk: Research strategies for updating toolset with backward compatibility | ✅ Created | [#2667](https://github.com/OpenHands/software-agent-sdk/issues/2667) |
Each issue includes:
- The context and rationale from the Slack discussion
- The comparison table between DelegateTool and TaskToolSet
- The proposed solution for backward compatibility (conditional tool loading based on conversation history)
- References to related work (PR #2064)
- Acceptance criteria where applicable
No code changes were made—only the 4 issues were created as requested.calm-artist-7206
04/02/2026, 2:48 PMsummary
• ... done?