mcp问题 #7283

Open
opened 2026-02-16 18:06:41 -05:00 by yindo · 1 comment
Owner

Originally created by @a65566230 on GitHub (Jan 23, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

Tool execution aborted
[
{
"code": "invalid_union",
"errors": [
[
{
"expected": "record",
"code": "invalid_type",
"path": [
"state",
"input"
],
"message": "Invalid input: expected record, received undefined"
}
],
[
{
"expected": "object",
"code": "invalid_type",
"path": [
"part"
],
"message": "Invalid input: expected object, received undefined"
},
{
"expected": "string",
"code": "invalid_type",
"path": [
"delta"
],
"message": "Invalid input: expected string, received undefined"
}
],
[
{
"expected": "object",
"code": "invalid_type",
"path": [
"part"
],
"message": "Invalid input: expected object, received undefined"
},
{
"expected": "string",
"code": "invalid_type",
"path": [
"delta"
],
"message": "Invalid input: expected string, received undefined"
}
]
],
"path": [],
"message": "Invalid input"
}
]

Plugins

No response

OpenCode version

1.1.33

Steps to reproduce

No response

Screenshot and/or share link

Image

Operating System

windows 11

Terminal

Windows Terminal

Originally created by @a65566230 on GitHub (Jan 23, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description Tool execution aborted [ { "code": "invalid_union", "errors": [ [ { "expected": "record", "code": "invalid_type", "path": [ "state", "input" ], "message": "Invalid input: expected record, received undefined" } ], [ { "expected": "object", "code": "invalid_type", "path": [ "part" ], "message": "Invalid input: expected object, received undefined" }, { "expected": "string", "code": "invalid_type", "path": [ "delta" ], "message": "Invalid input: expected string, received undefined" } ], [ { "expected": "object", "code": "invalid_type", "path": [ "part" ], "message": "Invalid input: expected object, received undefined" }, { "expected": "string", "code": "invalid_type", "path": [ "delta" ], "message": "Invalid input: expected string, received undefined" } ] ], "path": [], "message": "Invalid input" } ] ### Plugins _No response_ ### OpenCode version 1.1.33 ### Steps to reproduce _No response_ ### Screenshot and/or share link <img width="1699" height="725" alt="Image" src="https://github.com/user-attachments/assets/c0384391-50b9-4d93-8f8b-b40955dfb9b5" /> ### Operating System windows 11 ### Terminal Windows Terminal
yindo added the windowsbug labels 2026-02-16 18:06:41 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 23, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #9840: MCP tool call fails with invalid_union on state.input despite #9667 fix
  • #9020: Claude models fail on MCP tools with no required parameters (undefined vs {})
  • #8569: annoying bug when tag a file @ in CLI
  • #7674: Opencode errors on asking a question
  • #7439: AIHubMix provider streaming error with invalid_union

All show the same invalid_union validation error pattern with undefined values. The root cause appears to be handling of undefined parameters in MCP tool calls or model responses.

Feel free to ignore if your specific case addresses something different.

@github-actions[bot] commented on GitHub (Jan 23, 2026): This issue might be a duplicate of existing issues. Please check: - #9840: MCP tool call fails with invalid_union on state.input despite #9667 fix - #9020: Claude models fail on MCP tools with no required parameters (undefined vs {}) - #8569: annoying bug when tag a file @ in CLI - #7674: Opencode errors on asking a question - #7439: AIHubMix provider streaming error with invalid_union All show the same `invalid_union` validation error pattern with undefined values. The root cause appears to be handling of undefined parameters in MCP tool calls or model responses. Feel free to ignore if your specific case addresses something different.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7283