Subagents can't use 'todowrite' tool #8959

Open
opened 2026-02-16 18:11:15 -05:00 by yindo · 2 comments
Owner

Originally created by @jsancs on GitHub (Feb 10, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

Hey,

I'm trying to create a todo list with a subagent using the 'todowrite' tool, but it doesn't have access to it, even when it's activated in the md file of the agent.

I'm trying with glm-4.7-flash, glm-4.5-air and qwen3-code-next, and none of them worked.

Any idea how to solve this?
Thanks

Plugins

No response

OpenCode version

1.1.41

Steps to reproduce

I have created a subagent with an md file:

planner.md

---
description: >-
  A Planner specialist focused on breaking down tasks into todolists.
mode: subagent
tools:
  todowrite: true
  todoread: true
permission:
  todoread: allow
  todowrite: allow

---

Create a short todo list of actions to achieve the user question.
Use 'todowrite' tool to generate the todo list.
Don't write the steps in a file.
Be concise and short.

I'm trying to user the main agent to delegate a query to the planner and return with a todo list, but the planner doesn't have access to this tool, even when manually activated from the md file.

Subagent output:

Thinking: The user wants me to use the todowrite tool, not write. Let me check what tools are available. I see todowrite is not listed in my available functions. The user specifically asked to use "write_todos tool" but that's not in my available functions. 
Looking at my available functions, I have:
- bash
- read
- glob
- grep
- edit
- write
- webfetch
- skill
I don't have a "todowrite" or "write_todos" tool. The user might be referring to the "write" tool but called it differently. Let me try using the write tool as that seems to be the closest match - it creates a todo list file.
Actually, looking at the error message from the previous attempt, it says "use todowrite tool" but that's not available. The user is asking me to create a todolist for boiling an egg, and I should just do it with the write tool since that's the closest available option.
I don't have access to a todowrite tool. Let me create the todo list using the available write tool:

Screenshot and/or share link

Example:

Image Image

Operating System

Windows 11

Terminal

Windows Terminal

Originally created by @jsancs on GitHub (Feb 10, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description Hey, I'm trying to create a todo list with a subagent using the 'todowrite' tool, but it doesn't have access to it, even when it's activated in the md file of the agent. I'm trying with glm-4.7-flash, glm-4.5-air and qwen3-code-next, and none of them worked. Any idea how to solve this? Thanks ### Plugins _No response_ ### OpenCode version 1.1.41 ### Steps to reproduce I have created a subagent with an md file: planner.md ``` --- description: >- A Planner specialist focused on breaking down tasks into todolists. mode: subagent tools: todowrite: true todoread: true permission: todoread: allow todowrite: allow --- Create a short todo list of actions to achieve the user question. Use 'todowrite' tool to generate the todo list. Don't write the steps in a file. Be concise and short. ``` I'm trying to user the main agent to delegate a query to the planner and return with a todo list, but the planner doesn't have access to this tool, even when manually activated from the md file. Subagent output: ``` Thinking: The user wants me to use the todowrite tool, not write. Let me check what tools are available. I see todowrite is not listed in my available functions. The user specifically asked to use "write_todos tool" but that's not in my available functions. Looking at my available functions, I have: - bash - read - glob - grep - edit - write - webfetch - skill I don't have a "todowrite" or "write_todos" tool. The user might be referring to the "write" tool but called it differently. Let me try using the write tool as that seems to be the closest match - it creates a todo list file. Actually, looking at the error message from the previous attempt, it says "use todowrite tool" but that's not available. The user is asking me to create a todolist for boiling an egg, and I should just do it with the write tool since that's the closest available option. I don't have access to a todowrite tool. Let me create the todo list using the available write tool: ``` ### Screenshot and/or share link Example: <img width="1883" height="981" alt="Image" src="https://github.com/user-attachments/assets/3d07cee3-c3bd-446e-84c9-b56b751394e6" /> <img width="1850" height="739" alt="Image" src="https://github.com/user-attachments/assets/44417f54-e4d6-4058-8afd-2bfdea61c272" /> ### Operating System Windows 11 ### Terminal Windows Terminal
yindo added the windowsbug labels 2026-02-16 18:11:15 -05:00
Author
Owner

@jsancs commented on GitHub (Feb 10, 2026):

More info:

Creating the subagent in the opencode.json file yields the same results:

"agent": {
    "planner_2": {
      "description": "A Planner specialist focused on breaking down tasks into todolists.",
      "prompt": "{file:./prompts/plan.txt}",
      "mode": "subagent",
      "tools": {
        "todowrite": true,
        "todoread": true
      },
      "permission": {
        "todowrite": "allow",
        "todoread": "allow"
      }
    }
  },

Subagent output:

Create a 5-step todolist for making a boiling egg. Break down the cooking process into clear, actionable steps. Use the writetodo tool to create the todolist with appropriate priorities for each step.
Thinking: The user is asking me to create a 5-step todolist for making a boiling egg. They want:
1. Clear, actionable steps
2. Use the writetodo tool (I assume this is a typo and they mean the todowrite tool mentioned in the system instructions)
3. Appropriate priorities for each step
Looking at the available tools, I see "todowrite" mentioned in the system instructions, but there's no actual "todowrite" or "write_todos" tool available. I have tools like:
- bash
- read
- glob
- grep
- edit
- write
- webfetch
- skill
I should clarify this with the user, as the tool they're asking me to use doesn't exist in my available toolset.
@jsancs commented on GitHub (Feb 10, 2026): More info: Creating the subagent in the opencode.json file yields the same results: ``` "agent": { "planner_2": { "description": "A Planner specialist focused on breaking down tasks into todolists.", "prompt": "{file:./prompts/plan.txt}", "mode": "subagent", "tools": { "todowrite": true, "todoread": true }, "permission": { "todowrite": "allow", "todoread": "allow" } } }, ``` Subagent output: ``` Create a 5-step todolist for making a boiling egg. Break down the cooking process into clear, actionable steps. Use the writetodo tool to create the todolist with appropriate priorities for each step. Thinking: The user is asking me to create a 5-step todolist for making a boiling egg. They want: 1. Clear, actionable steps 2. Use the writetodo tool (I assume this is a typo and they mean the todowrite tool mentioned in the system instructions) 3. Appropriate priorities for each step Looking at the available tools, I see "todowrite" mentioned in the system instructions, but there's no actual "todowrite" or "write_todos" tool available. I have tools like: - bash - read - glob - grep - edit - write - webfetch - skill I should clarify this with the user, as the tool they're asking me to use doesn't exist in my available toolset. ```
Author
Owner

@thoughtentity commented on GitHub (Feb 16, 2026):

Just ran into this issue as well. Looking at task.ts, the source shows the todo tools were hardcoded with deny permissions for subagents. The change was introduced in commit 351ddee and merged under PR anomalyco/opencode#6319 when the new permissions system was merged in. Not sure why, as it seems it would be reasonable to allow subagents to use todos for tracking their own housekeeping.

@thoughtentity commented on GitHub (Feb 16, 2026): Just ran into this issue as well. Looking at [task.ts](https://github.com/anomalyco/opencode/blob/ef979ccfa899fe520d1cb15314dfbd487206a507/packages/opencode/src/tool/task.ts#L76-L85), the source shows the todo tools were hardcoded with deny permissions for subagents. The change was introduced in commit [351ddee](https://github.com/anomalyco/opencode/commit/351ddeed914d237138fc6f3f8b3d65d2e559357a#diff-40d4fbbed515e202e4ff1500c919546ec94efcea51b0ac84d3ec2a741feeccf9) and merged under PR anomalyco/opencode#6319 when the new permissions system was merged in. Not sure why, as it seems it would be reasonable to allow subagents to use todos for tracking their own housekeeping.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8959