anthropic.onSessionBudgetReached starts an automation when a session reaches its spend ceiling. It corresponds to the session.budget_reached Anthropic webhook event.
Example
automations/anthropic-on-session-budget-reached.automation.ts
Options
Passaccount to select a named Anthropic Managed Agents connection. The connection must include the workspace’s webhook signing key.
Event
Returns a verified event withid, createdAt, providerEventType, organizationId, workspaceId, resourceId, sessionThreadId (string for thread lifecycle events, otherwise null), and the authoritative resource. Deleted resources are null. Session-idled events also include the latest session.status_idle event and its typed stop reason.
Anthropic can retry or reorder deliveries. Automate.ax deduplicates the provider event ID, verifies five-minute signature freshness, and fetches current provider state before starting an independent root context.