Skip to content

AI_InvalidToolInputError: Invalid input for tool todowrite #1373

Closed

Description

@binajmen

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

Activity

  1. joe-p commented on Jul 29, 2025

    @joe-p

    Seeing same thing on Anthropic Sonnet 4 on 0.3.81

  2. self-assigned this
    on Aug 4, 2025
  3. rekram1-node commented on Aug 29, 2025

    @rekram1-node
    Contributor

    are either of you still seeing this on latest?

  4. CruelAddict commented on Sep 10, 2025

    @CruelAddict

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

  5. abh1nav commented on Nov 8, 2025

    @abh1nav

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

    Image
  6. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Nov 8, 2025
  7. rekram1-node commented on Nov 8, 2025

    @rekram1-node
    Contributor

    wow wtf all the empty ones

    what model is that?

  8. abh1nav commented on Nov 8, 2025

    @abh1nav

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

  9. removed
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Nov 8, 2025
  10. rekram1-node commented on Nov 8, 2025

    @rekram1-node
    Contributor

    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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions