Error Model
Layers of failure
A tool call can fail at more than one layer:
- MCP transport or protocol layer
- Server tool execution layer
- Inspector response layer
- Injection/bootstrap layer
Fields to inspect
When available, inspect these fields in order:
isErrorat the MCP response levelsuccessin structured contenterrorerrorCoderecovery, the canonicalrecoveryobject for automated recovery guidanceerrorData
For compatibility with older clients, the same values may also be projected into these top-level compatibility projection fields when present. Prefer recovery.* whenever both surfaces exist:
hintsuggestedActionrequiresReconnectstateAfterTimeoutUnknownprocessIdtimeoutSecondsretryAfterSecondsretryAfteravailableTokensavailableEvents
Injection-related failures
Important injection-stage outcomes include:
ArchitectureMismatchBootstrapFailedPipeReadyTimeout
Interpretation guidance
- Architecture mismatch:
ArchitectureMismatchis an injection/bootstrapper error. Use a server/bootstrapper build that matches the target process bitness when raw injection is required. SDK-hosted reuse communicates over named pipes and does not require matching process bitness once the target-side host is already running. - Bootstrap failed: the bootstrapper ran but failed before the inspector was fully ready.
- Pipe ready timeout: the managed bridge may have been invoked, but the named pipe never became ready in time.
Recovery contract highlights
Modern tool responses may expose a canonical recovery object beyond errorCode. Read the canonical recovery object first, then use top-level compatibility projection fields only as additive mirrors for older clients.
recovery.suggestedAction: human-readable next step, such as retrying, reconnecting, or restarting the MCP server with elevation.recovery.requiresReconnect: indicates that the previous pipe-backed session should be treated as stale andconnectshould be called again before retrying.recovery.stateAfterTimeoutUnknown: indicates that a timed-out mutation or pipe-backed operation may still have changed target state, so reconnect and re-read before assuming success or failure.recovery.processId: the target process associated with a reconnect or timeout hint.recovery.timeoutSeconds: the server-side timeout budget that was exceeded.recovery.retryAfterSecondsandrecovery.retryAfter: rate-limit recovery hints for automated backoff.
Examples:
- Timeout responses may combine
errorCodewithrecovery.requiresReconnect,recovery.stateAfterTimeoutUnknown,recovery.processId, andrecovery.timeoutSecondsso the client can distinguish a stale pipe or unknown target state from a generic slow operation. - Rate-limit responses may include
recovery.retryAfterSecondsandrecovery.retryAfterfor deterministic retry scheduling. - Elevation or access-denied responses may pair
errorCodewithrecovery.suggestedActionso the next step is explicit instead of inferred from the message text.
Agent guidance
When an action fails, ask the agent to report:
- the tool name
- the target process ID
- the exact error text
- the
recoveryobject, plus any mirroredsuggestedAction,requiresReconnect,stateAfterTimeoutUnknown, orretryAfterSecondscompatibility fields - the architecture involved
- whether the build was Debug or Release
That gives enough context to triage most setup failures quickly.