Package: @hexos/runtime

Error thrown when an async operation exceeds its allowed time limit.

Contains a code field for programmatic error handling (e.g., 'TOOL_TIMEOUT', 'APPROVAL_TIMEOUT', 'MCP_TIMEOUT'). Used by withTimeout and checked by AgentRuntime to emit appropriate error events.

class TimeoutError extends Error {
    readonly code: string;
    constructor(message: string, code:  = 'TIMEOUT')
}
  • Extends: Error

code

string

constructor

(message: string, code: = 'TIMEOUT') => TimeoutError