AI_InvalidToolInputError: Invalid input for tool todowrite #955

Open
opened 2026-02-16 17:28:54 -05:00 by yindo · 7 comments
Owner

Originally created by @binajmen on GitHub (Jul 28, 2025).

Originally assigned to: @thdxr on GitHub.

FYI, just sharing as I dont know if you are monitoring this.

AI_InvalidToolInputError: Invalid input for tool todowrite: Type validation
failed: Value: {"todos":"[{\"content\": \"Analyze current project structure
and understand data models\", \"id\": \"1\", \"priority\": \"high\",
\"status\": \"completed\"}, {\"content\": \"Design import feature requirements
and validation logic\", \"id\": \"2\", \"priority\": \"high\", \"status\":
\"in_progress\"}, {\"content\": \"Plan database schema changes if needed\",
\"id\": \"3\", \"priority\": \"medium\", \"status\": \"pending\"},
{\"content\": \"Design UI flow for project import feature\", \"id\": \"4\",
\"priority\": \"medium\", \"status\": \"pending\"}, {\"content\": \"Create
implementation plan with specific components\", \"id\": \"5\", \"priority\":
\"high\", \"status\": \"pending\"}]</parameter>\n</invoke>"}.
Error message: [
  {
    "code": "invalid_type",
    "expected": "array",
    "received": "string",
    "path": [
      "todos"
    ],
    "message": "Expected array, received string"
  }
]

Using GitHub Copilot Sonnet 4

Originally created by @binajmen on GitHub (Jul 28, 2025). Originally assigned to: @thdxr on GitHub. FYI, just sharing as I dont know if you are monitoring this. ``` AI_InvalidToolInputError: Invalid input for tool todowrite: Type validation failed: Value: {"todos":"[{\"content\": \"Analyze current project structure and understand data models\", \"id\": \"1\", \"priority\": \"high\", \"status\": \"completed\"}, {\"content\": \"Design import feature requirements and validation logic\", \"id\": \"2\", \"priority\": \"high\", \"status\": \"in_progress\"}, {\"content\": \"Plan database schema changes if needed\", \"id\": \"3\", \"priority\": \"medium\", \"status\": \"pending\"}, {\"content\": \"Design UI flow for project import feature\", \"id\": \"4\", \"priority\": \"medium\", \"status\": \"pending\"}, {\"content\": \"Create implementation plan with specific components\", \"id\": \"5\", \"priority\": \"high\", \"status\": \"pending\"}]</parameter>\n</invoke>"}. Error message: [ { "code": "invalid_type", "expected": "array", "received": "string", "path": [ "todos" ], "message": "Expected array, received string" } ] ``` Using GitHub Copilot Sonnet 4
yindo added the model-problem label 2026-02-16 17:28:54 -05:00
Author
Owner

@joe-p commented on GitHub (Jul 29, 2025):

Seeing same thing on Anthropic Sonnet 4 on 0.3.81

@joe-p commented on GitHub (Jul 29, 2025): Seeing same thing on Anthropic Sonnet 4 on 0.3.81
Author
Owner

@rekram1-node commented on GitHub (Aug 29, 2025):

are either of you still seeing this on latest?

@rekram1-node commented on GitHub (Aug 29, 2025): are either of you still seeing this on latest?
Author
Owner

@CruelAddict commented on GitHub (Sep 10, 2025):

Just got this issue on 0.7.0 (qwen3-coder-480b)

@CruelAddict commented on GitHub (Sep 10, 2025): Just got this issue on 0.7.0 (qwen3-coder-480b)
Author
Owner

@abh1nav commented on GitHub (Nov 7, 2025):

Running into this quite often on v1.0.45 (OpenRouter, GLM 4.6 exacto, MacOS 15.7.1, Ghostty v1.2.3)

Image
@abh1nav commented on GitHub (Nov 7, 2025): Running into this quite often on v1.0.45 (OpenRouter, GLM 4.6 exacto, MacOS 15.7.1, Ghostty v1.2.3) <img width="1348" height="1299" alt="Image" src="https://github.com/user-attachments/assets/a7a00e04-e9b3-427e-bfbf-1f18ce130f99" />
Author
Owner

@rekram1-node commented on GitHub (Nov 7, 2025):

wow wtf all the empty ones

what model is that?

@rekram1-node commented on GitHub (Nov 7, 2025): wow wtf all the empty ones what model is that?
Author
Owner

@abh1nav commented on GitHub (Nov 8, 2025):

GLM 4.6 exacto.
This isn't specific to 1.x, it used to happen occasionally in 0.15.x too.

@abh1nav commented on GitHub (Nov 8, 2025): GLM 4.6 exacto. This isn't specific to 1.x, it used to happen occasionally in 0.15.x too.
Author
Owner

@rekram1-node commented on GitHub (Nov 8, 2025):

oh okay then thats the model calling the tool stupidly

thought this was a bug on our end

we could prolly do something to make ux better here tho

@rekram1-node commented on GitHub (Nov 8, 2025): oh okay then thats the model calling the tool stupidly thought this was a bug on our end we could prolly do something to make ux better here tho
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#955