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 -1
View File
@@ -9,6 +9,7 @@ from .errors import Conflict, Missing, ToolError
from .fields import (
COMMAND_LIMIT,
DESCRIPTION_LIMIT,
MCP_WAIT_CAP,
OPTION_LIMIT,
PATH_LIMIT,
WAIT_CAP,
@@ -233,7 +234,7 @@ class Asking:
def decision_wait(self, arguments: dict) -> dict:
expect(arguments, ("id", "timeout_seconds"))
decision_id = field(arguments, "id")
record = self.decisions.wait(decision_id, seconds(arguments, "timeout_seconds", WAIT_CAP))
record = self.decisions.wait(decision_id, seconds(arguments, "timeout_seconds", MCP_WAIT_CAP))
if record is None:
raise ToolError(f"no decision {decision_id}")
return decision_state(record)