openclaw - 💡(How to fix) Fix MCP server calls timeout too early for long-running multi-model deliberation (claw-court)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

  1. MCP error -32001: Request timed out — the MCP runtime is disposed while court is still running

Root Cause

The MCP protocol/implementation doesn't support:

  • Long-running tool calls (>60s)
  • Streaming/progress notifications to keep connection alive
  • True async fire-and-forget with later polling

Fix Action

Fix / Workaround

Current Workarounds Attempted

This affects any MCP tool that needs multi-step LLM deliberation, not just claw-court. The current limitation pushes users toward exec/subagent workarounds, fragmenting the architecture.

Code Example

"mcp": {
  "servers": {
    "claw-court-mcp": {
      "command": "...",
      "timeout": 300000  // 5 minutes
    }
  }
}

---

{"jsonrpc": "2.0", "method": "notifications/progress", "params": {"progress": 0.5, "total": 1.0}}
RAW_BUFFERClick to expand / collapse

Problem

The claw-court-mcp server wraps claw-court-v2.py, which performs multi-model deliberation (6+ LLM calls, sequential or parallel). Each LLM call takes 10-30s, totaling 90-180s. However, the Gateway MCP call timeout appears to be ~30-60s, causing:

  1. MCP error -32001: Request timed out — the MCP runtime is disposed while court is still running
  2. Session file locks — the disposed runtime leaves session state inconsistent
  3. Agent failure loops — repeated timeout/lock cycles

Current Workarounds Attempted

  1. Increased script internal timeout (300s → 600s) — claw-court-mcp.py subprocess timeout — ❌ no effect, Gateway kills MCP connection earlier
  2. Gateway config mcp.servers.claw-court-mcp.timeout — set to 600000ms, restarted gateway — ❌ still times out
  3. Async job mode — MCP returns job_id immediately, runs court in background thread — ❌ Gateway still waits for final response, times out before job completes

Root Cause

The MCP protocol/implementation doesn't support:

  • Long-running tool calls (>60s)
  • Streaming/progress notifications to keep connection alive
  • True async fire-and-forget with later polling

Suggested Solutions

Option A: Configurable per-server MCP timeout

"mcp": {
  "servers": {
    "claw-court-mcp": {
      "command": "...",
      "timeout": 300000  // 5 minutes
    }
  }
}

Option B: Support MCP progress notifications (SSE-style)

Allow MCP servers to send intermediate progress updates to prevent connection timeout:

{"jsonrpc": "2.0", "method": "notifications/progress", "params": {"progress": 0.5, "total": 1.0}}

Option C: Native async job support

Gateway accepts {"status": "pending", "job_id": "xxx"} as valid final response, provides mcp_job_status tool for polling.

Impact

This affects any MCP tool that needs multi-step LLM deliberation, not just claw-court. The current limitation pushes users toward exec/subagent workarounds, fragmenting the architecture.

Environment

  • OpenClaw version: 2026.5.27 (27ae826)
  • Runtime: macOS, arm64
  • Model: kimi/kimi-for-coding
  • Timeout observed: ~30-60s (exact value unknown, not configurable)

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix MCP server calls timeout too early for long-running multi-model deliberation (claw-court)