Skip to content

BudgetExceededError

Thrown when the session cost limit is exceeded (if onLimit: "error").

new BudgetExceededError(cost, limit): BudgetExceededError

number

number

BudgetExceededError

AgentExpressError.constructor

readonly optional cause?: Error

Original error that caused this one, if any.

AgentExpressError.cause


code: string

Machine-readable error code (e.g., “ABORT”, “RATE_LIMIT”, “TOOL_DENIED”).

AgentExpressError.code


readonly cost: number

Accumulated cost in USD at the time of the error.


readonly limit: number

Configured limit in USD.


readonly retryable: boolean

Whether this error can be retried by retry middleware.

AgentExpressError.retryable