Skip to content

fix(mcp): apply timeouts to prompts and resources#31612

Merged
rekram1-node merged 4 commits into
devfrom
fix/mcp-prompt-resource-timeouts-v2
Jun 10, 2026
Merged

fix(mcp): apply timeouts to prompts and resources#31612
rekram1-node merged 4 commits into
devfrom
fix/mcp-prompt-resource-timeouts-v2

Conversation

@rekram1-node

Copy link
Copy Markdown
Collaborator

Summary

  • pass effective MCP request timeouts to prompts/get and resources/read
  • preserve timeout precedence: per-server timeout, then experimental.mcp_timeout, then the SDK default
  • cover per-server precedence and the experimental fallback for both request types

Testing

  • bun test test/mcp/lifecycle.test.ts (30 passed)
  • git diff --check
  • bun typecheck reached unrelated V2 reference errors because the isolated worktree shares package links with another dirty/older worktree; no MCP type errors were reported

Relates to: #28567

@rekram1-node rekram1-node merged commit 174ab58 into dev Jun 10, 2026
8 checks passed
@rekram1-node rekram1-node deleted the fix/mcp-prompt-resource-timeouts-v2 branch June 10, 2026 04:58
JiaHuiRed pushed a commit to JiaHuiRed/RedCode that referenced this pull request Jun 10, 2026
- anomalyco#31595 create failure-safe:Effect.catchCause 兜底,服务起不来不再被吞错静默消失,收敛 status:"failed"+错因
- anomalyco#31544 actionable status:!mcpClient 且非 connected/disabled 时打 server unavailable(带 key/type/status)
- anomalyco#31612 timeouts:getPrompt/readResource 经 withClient 透传超时(配置→experimental.mcp_timeout→DEFAULT_TIMEOUT 30s),防永久挂起
- opencode package.json 0.4.11 → 0.4.12(CHANGELOG/README 徽章已随上一提交入库)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant