fix(orchestrator): cap MCP tool waits at 50 s below the client timeout

Claude Code's MCP client abandons a tool call before 240 s with "The
operation timed out.", so review_wait, decision_wait and
rule_request_wait now wait at most MCP_WAIT_CAP (50 s) and tell the
caller to call again while the status is pending. HTTP waits keep
WAIT_CAP (300 s). kvb-git-diff step 3 asks for timeout_seconds 50.

🎯 Fix: 95 %
💥 Break: 2 %
💸 Tokens: –
⏱️ Velocity: –
🛡️ Security: 100 %
🏆 Score: 93
🚦 Gate: ✅ 90/5, tokens and velocity <= 100, security 100 %

Created-with: https://s.veen.world/skills
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kevin Veen-BirkenbachandClaude Opus 5.5 committed 2026-11-28 00:48:25 +00:00
1 parent b15dd5e414
commit 909ea85605
7 files changed
+17 -13

No files matched your search

+2
View File
@@ -8,6 +8,8 @@ from .errors import ToolError
from .signed import limits, signing
WAIT_CAP = 300
# Claude Code's MCP client abandons a tool call before 240 s ("The operation timed out."); 50 s proved safe 2026-11-27.
MCP_WAIT_CAP = 50
TEXT_LIMIT = 20_000
COMMAND_LIMIT = 4000
PATH_LIMIT = limits.PATH_LIMIT