-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Description
Description
OpenCode v1.1.21's per-server MCP timeout setting (mcp.SERVER_NAME.timeout) is ignored. Long-running MCP tools timeout after ~60 seconds despite being configured with longer timeouts in the schema-documented field.
Environment:
• OpenCode: v1.1.21
• MCP Server: RepoPrompt (context_builder tool, typical runtime 5-20 minutes)
• Model: zai-coding-plan/glm-4.7
• Other harnesses (Codex, Claude Code): Work without issue using same MCP server
Expected Behavior:
Per the JSON schema, setting mcp.RepoPrompt.timeout: 3600000 should allow the tool to run for up to 1 hour.
Actual Behavior:
Tools timeout after ~60 seconds with error: McpError: MCP error -32001: Request timed out
Non-Working Configuration:
Working Configuration:
{
"experimental": {
"mcp_timeout": 3600000 // Global MCP timeout
},
"mcp": {
"RepoPrompt": {
"type": "local",
"command": ["/Users/REDACTED/RepoPrompt/repoprompt_cli"],
"environment": {},
"timeout": 3600000 // Still specified but has no effect
}
},
"provider": {
"zai-coding-plan": {
"options": {
"apiKey": "REDACTED",
"timeout": false // Required to prevent model timeout override
}
}
}
}Root Cause:
The timeout hierarchy appears broken. Per-server timeouts should take precedence, but the global experimental setting + disabling model timeout is required instead.
Plugins
No response
OpenCode version
1.1.21
Steps to reproduce
- Send a task to GLM 4.7 instructing to use the RepoPrompt context_builder to gather context and generate a plan.
- Wait
Screenshot and/or share link
No response
Operating System
macOS
Terminal
iTerm2
{ "mcp": { "RepoPrompt": { "type": "local", "command": ["/Users/REDACTED/RepoPrompt/repoprompt_cli"], "environment": {}, "timeout": 3600000 // Per-server timeout } }, "provider": { "zai-coding-plan": { "options": { "apiKey": "REDACTED" // No timeout specified } } } }