Task allocated to the sub agent covers more than a single todo item. #23

Closed
opened 2026-02-16 08:19:28 -05:00 by yindo · 3 comments
Owner

Originally created by @Vignesh-95 on GitHub (Aug 22, 2025).

The task allocated to a subagent through the task tool has a description that covers more than just a single item from the TODO list.
Though more than one task can be in progress at any point in time, allowing multiple tool calls for parallel sub agents, each task allocated should be targeted at a single TODO item only.

Since this is issue is revolves around the tools of the main agent i.e. write_todos and task tools, it requires modification of the base_prompt for the deep agent supervisor, or the pre-fix or suffix of the task tool, instead of modifying the deep agent instructions prompt or the sub agent system or description configuration.

Thats my opinion.

I modified the base_prompt in bold:

  • When doing web search, prefer to use the task tool in order to reduce context usage.
    Each invocation of the task tool can handle one and only one task from the todo list at a time, and the description of the task should be specific to the task from the todo list that it is working on.
    You should target a task from the todo list at a time and the task tool can only handle one task - the task in progress - and the description should be constructed just for that task.
    REFERENCE THE TODO INSTRUCTIONS - SAY THE TODO FOR THIS TASK IS TODO NUMBER X.

Could be optimised better but allows coupling the planner/supervisor to the sub agent executor, which otherwise ends up in a loop trying to solve multiple todo items at a time.

Originally created by @Vignesh-95 on GitHub (Aug 22, 2025). The task allocated to a subagent through the task tool has a description that covers more than just a single item from the TODO list. Though more than one task can be in progress at any point in time, allowing multiple tool calls for parallel sub agents, each task allocated should be targeted at a single TODO item only. Since this is issue is revolves around the tools of the main agent i.e. write_todos and task tools, it requires modification of the base_prompt for the deep agent supervisor, or the pre-fix or suffix of the task tool, instead of modifying the deep agent instructions prompt or the sub agent system or description configuration. Thats my opinion. I modified the base_prompt in bold: - When doing web search, prefer to use the `task` tool in order to reduce context usage. **Each invocation of the task tool can handle one and only one task from the todo list at a time, and the description of the task should be specific to the task from the todo list that it is working on. You should target a task from the todo list at a time and the task tool can only handle one task - the task in progress - and the description should be constructed just for that task. REFERENCE THE TODO INSTRUCTIONS - SAY THE TODO FOR THIS TASK IS TODO NUMBER X.** Could be optimised better but allows coupling the planner/supervisor to the sub agent executor, which otherwise ends up in a loop trying to solve multiple todo items at a time.
yindo closed this issue 2026-02-16 08:19:28 -05:00
Author
Owner

@Vignesh-95 commented on GitHub (Aug 22, 2025):

I will be making a PR for this but just wanted some discussion on whether my above thoughts on the best place to place this prompt is applicable and whether the issue is actually an issue.

@Vignesh-95 commented on GitHub (Aug 22, 2025): I will be making a PR for this but just wanted some discussion on whether my above thoughts on the best place to place this prompt is applicable and whether the issue is actually an issue.
Author
Owner

@hwchase17 commented on GitHub (Aug 25, 2025):

yeah this is a pure prompting issue. im open to seeing a pr for better prompts. we should make all these prompts easily configurable at some point though, so people can change without having to go into source code

@hwchase17 commented on GitHub (Aug 25, 2025): yeah this is a pure prompting issue. im open to seeing a pr for better prompts. we should make all these prompts easily configurable at some point though, so people can change without having to go into source code
Author
Owner

@Vignesh-95 commented on GitHub (Aug 26, 2025):

Awesome thanks for the feedback. I did see a prompt configuration pr from someone. Will track how that goes and if not, will be happy to work on this myself

@Vignesh-95 commented on GitHub (Aug 26, 2025): Awesome thanks for the feedback. I did see a prompt configuration pr from someone. Will track how that goes and if not, will be happy to work on this myself
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/deepagents#23