You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] tools[21].function.name': string too long. Expected a string with maximum length 64, but got a string with length 65 instead. #3523
Tool name is too long. This was taken from logs.
Opencode does not send any error message to TUI, it just will die silently.
And it also do not process any more request when tool name is too long, even when unrelated to MCP servers.
changed the title [-]tools[21].function.name': string too long. Expected a string with maximum length 64, but got a string with length 65 instead.[/-][+][BUG] tools[21].function.name': string too long. Expected a string with maximum length 64, but got a string with length 65 instead.[/+]on Oct 29, 2025
Both issues involve MCP server tool naming validation problems, though #3523 specifically mentions the 64-character length limit while the others mention pattern validation. The root cause appears related to how OpenCode generates tool names from MCP server names + tool names.
Feel free to ignore if none of these address your specific case.
I'm using GitHub Copilot GPT-4.1 as that is the only one I currently have access.
I see the error in opencode log files (running this as opencode --log-level DEBUG ), but terminal client just dies silently. There is no error message.
INFO 2025-10-29T16:10:59 +1ms service=session.prompt session=ses_5cf4368afffewe4wL4auBcU6OA type=error part
ERROR 2025-10-29T16:10:59 +1ms service=session.prompt session=ses_5cf4368afffewe4wL4auBcU6OA error=Invalid 'tools[29].function.name': string too long. Expected a string with maximum length 64, but got a string with length 65 instead. process
Activity
[-]tools[21].function.name': string too long. Expected a string with maximum length 64, but got a string with length 65 instead.[/-][+][BUG] tools[21].function.name': string too long. Expected a string with maximum length 64, but got a string with length 65 instead.[/+]github-actions commentedon Oct 29, 2025
This issue might be a duplicate of existing issues. Please check:
Both issues involve MCP server tool naming validation problems, though #3523 specifically mentions the 64-character length limit while the others mention pattern validation. The root cause appears related to how OpenCode generates tool names from MCP server names + tool names.
Feel free to ignore if none of these address your specific case.
rekram1-node commentedon Oct 29, 2025
What provider gave that error?
Racle commentedon Oct 29, 2025
Company internal MCP server. Tool names are generated and limited to ~50 characters.
rekram1-node commentedon Oct 29, 2025
@Racle but that error comes from an inference provider I thought, I don't think the ai sdk is throwing it (could be wrong tho)
What inference provider was it? Openai? Google?
Racle commentedon Oct 29, 2025
Test MCP config what can be used to test this:
I'm using
GitHub Copilot GPT-4.1as that is the only one I currently have access.I see the error in opencode log files (running this as
opencode --log-level DEBUG), but terminal client just dies silently. There is no error message.rekram1-node commentedon Oct 29, 2025
good to know thanks!
faizhasim commentedon Nov 13, 2025
I encounter similar issues when using any of the gpt models (from copilot) and docker mcp enabled. Other models (claude/gemini 2.5 pro) works fine.
rekram1-node commentedon Nov 13, 2025
Yeah if you are using too many tools they get upset, im not sure what we can do for u besides truncate the tools and give u an error or warning
Br1an67 commentedon Mar 1, 2026
I'd like to work on this. The fix truncates the combined MCP server + tool name to 64 characters and logs a warning when truncation occurs.
PR: #15595
morpheus9393 commentedon Mar 6, 2026
Samem problem here when using latest GPT-5.3 Codex in OC 1.2.18
"Invalid 'input[].call_id': string too long. Expected a string with maximum length 64, but got a string with length 2507 instead."
EvanDataForge commentedon Mar 7, 2026
I keep getting this error
using model: nvidia/moonshotai/kimi-k2.5, but also with openai/gpt5.3-codex
morpheus9393 commentedon Mar 7, 2026
It seems this bug mainly concers longr sessions. Started over with a new session with Codex-5.3 and there error does not appear.
fix: resolve 4 bugs — payload bloat, MCP subagents, tool names, token…
github-actions commentedon Jul 3, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.
fix(mcp): truncate tool names exceeding 64 chars to fit provider limit