anthropic.runAgent starts a session and resumes after its first turn idles or terminates.
Example
automations/anthropic-run-agent.automation.ts
Inputs
Accepts the same input asstartSession, but requires 1–50 initialEvents items so the session starts work. The optional account must be a static connection name or account reference because the action and callback subscriptions share it. Configure the Anthropic Console webhook before deploying. Inputs use public camelCase names and accept signals.
Output and behavior
Returns a durable signal classified ascompleted, requiresAction, budgetReached, retriesExhausted, or terminated. The callback is an independent root correlated by session ID.
Anthropic requests time out before the action lease and provider mutations are not retried after an uncertain response unless stated otherwise.