AI_InvalidToolInputError: Invalid input for tool todowrite #918

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

Originally created by @ds-brandao on GitHub (Jul 25, 2025).

Originally assigned to: @thdxr on GitHub.

I have been really enjoying opencode, it is a great tool but i have been consistently getting the following message after switching tobuildmode while using openai models:

AI_InvalidToolInputError: Invalid input for tool todowrite: Type validation failed: Value:
{"todos":[{"id":"todo1","status":"completed"}]}.
Error message: [
  {
    "code": "invalid_type",
    "expected": "string",
    "received": "undefined",
    "path": [
      "todos",
      0,
      "content"
    ],
    "message": "Required"
  },
  {
    "expected": "'high' | 'medium' | 'low'",
    "received": "undefined",
    "code": "invalid_type",
    "path": [
      "todos",
      0,
      "priority"
    ],
    "message": "Required"
  }
]
Originally created by @ds-brandao on GitHub (Jul 25, 2025). Originally assigned to: @thdxr on GitHub. I have been really enjoying opencode, it is a great tool but i have been consistently getting the following message after switching to`buildmode` while using openai models: ``` AI_InvalidToolInputError: Invalid input for tool todowrite: Type validation failed: Value: {"todos":[{"id":"todo1","status":"completed"}]}. Error message: [ { "code": "invalid_type", "expected": "string", "received": "undefined", "path": [ "todos", 0, "content" ], "message": "Required" }, { "expected": "'high' | 'medium' | 'low'", "received": "undefined", "code": "invalid_type", "path": [ "todos", 0, "priority" ], "message": "Required" } ] ```
yindo closed this issue 2026-02-16 17:28:46 -05:00
Author
Owner

@unholywhale commented on GitHub (Jul 25, 2025):

Just had the same problem with OpenRouter Qwen3 Coder

@unholywhale commented on GitHub (Jul 25, 2025): Just had the same problem with OpenRouter Qwen3 Coder
Author
Owner

@thdxr commented on GitHub (Jul 26, 2025):

try latest

@thdxr commented on GitHub (Jul 26, 2025): try latest
Author
Owner

@ds-brandao commented on GitHub (Jul 26, 2025):

i am seen the same issue with version 0.3.77. is there a newer version?

i am seen this problem whenever I have it generate a plan and then execute it.

@ds-brandao commented on GitHub (Jul 26, 2025): i am seen the same issue with version `0.3.77`. is there a newer version? i am seen this problem whenever I have it generate a plan and then execute it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#918