ask-mcp-is-defense-in-depth-bounded
IN derived (depth 2)
MCP-backed ask queries are bounded at two independent layers: application-level iteration caps with error-tolerant fallback at the ask layer, plus per-call and connection timeouts at the MCP bridge transport layer — no single timeout failure can cause unbounded execution.
Summary
When the system queries external tools through MCP, there are two separate safety nets preventing it from hanging forever. The application layer caps how many tool calls can happen and gracefully handles errors, while the transport layer independently enforces time limits on each connection and call. Because these operate independently, even if one layer's protection fails, the other still prevents runaway execution.
Justifications
SL — Layered timeout enforcement across ask application and MCP bridge transport
Antecedents (all must be IN):
- ask-mcp-integration-is-safely-bounded — MCP tool calls in `ask()` are both error-tolerant (exceptions caught and fed back as context for alternative tool selection) and iteration-bounded (5 tool-call rounds max), preventing both crashes from MCP server failures and runaway tool loops.
- mcp-bridge-is-timeout-bounded-at-all-phases — MCP bridge operations are timeout-bounded at both connection establishment (30s) and per-tool execution (60s), preventing indefinite blocking on unresponsive MCP servers at any lifecycle phase.