Qwen 3 Coder is completely unable to use the TODO system #1211

Closed
opened 2026-02-16 17:30:01 -05:00 by yindo · 3 comments
Owner

Originally created by @alexispurslane on GitHub (Aug 10, 2025).

Originally assigned to: @thdxr on GitHub.

I've never seen it successfully do it once. It always does like 8 iterations of this, before giving up:

Image
Originally created by @alexispurslane on GitHub (Aug 10, 2025). Originally assigned to: @thdxr on GitHub. I've never seen it successfully do it once. It always does like 8 iterations of this, before giving up: <img width="1038" height="1219" alt="Image" src="https://github.com/user-attachments/assets/08eb9dd0-b8d3-4536-b9e3-653c59adfe27" />
yindo closed this issue 2026-02-16 17:30:01 -05:00
Author
Owner

@florath commented on GitHub (Aug 12, 2025):

I can confirm that this is a problem. But IMHO the problem is not OpenCode but how the tool call is encoded:

Is:

{
  "todos": "[{\"content\": \"Research Conway's Game of Life...\", ...}]"
}

should:

{
  "todos": [
    {"content": "Research Conway's Game of Life...", "status": "pending", "priority": "high", "id": "task1"},
    {"content": "Design GUI layout using tkinter", "status": "pending", "priority": "high", "id": "task2"}
  ]
}

Image

I could reproduce this with a self hosted unsloth/Qwen3-Coder-30B-A3B-Instruct model with fixed tool-calling. (For simpler function calls the model works fine.)

@florath commented on GitHub (Aug 12, 2025): I can confirm that this is a problem. But IMHO the problem is not OpenCode but how the tool call is encoded: Is: ``` { "todos": "[{\"content\": \"Research Conway's Game of Life...\", ...}]" } ``` should: ``` { "todos": [ {"content": "Research Conway's Game of Life...", "status": "pending", "priority": "high", "id": "task1"}, {"content": "Design GUI layout using tkinter", "status": "pending", "priority": "high", "id": "task2"} ] } ``` <img width="1615" height="408" alt="Image" src="https://github.com/user-attachments/assets/df6533d5-6576-4a06-9233-64a343cdc3ef" /> I could reproduce this with a self hosted unsloth/Qwen3-Coder-30B-A3B-Instruct model with fixed tool-calling. (For simpler function calls the model works fine.)
Author
Owner

@florath commented on GitHub (Aug 12, 2025):

After spending some hours on this topic, I'm pretty convinced that this is a problem on the LLM side: it looks that qwen3-coder is some kind of sloppy when it comes to correct JSON output. Maybe this is because of the buggy chat template. The todolist is only one aspect.

Because I cannot wait until the Qwen3 team fixes this and releases a new version, I create a small proxy in between OpenCode and qwen3-coder that fixes the responses from the the LLM that OpenCode is able to handle them.
See: https://github.com/florath/qwen3-call-patch-proxy

@florath commented on GitHub (Aug 12, 2025): After spending some hours on this topic, I'm pretty convinced that this is a problem on the LLM side: it looks that qwen3-coder is some kind of sloppy when it comes to correct JSON output. Maybe this is because of the buggy chat template. The todolist is only one aspect. Because I cannot wait until the Qwen3 team fixes this and releases a new version, I create a small proxy in between OpenCode and qwen3-coder that fixes the responses from the the LLM that OpenCode is able to handle them. See: https://github.com/florath/qwen3-call-patch-proxy
Author
Owner

@thdxr commented on GitHub (Aug 12, 2025):

i had disabled the todo tool for a bit with qwen and added it back in. going to go back to disablng

@thdxr commented on GitHub (Aug 12, 2025): i had disabled the todo tool for a bit with qwen and added it back in. going to go back to disablng
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1211