RunContext

What your tool or hook receives about the run it is part of.

Fields

depsDepsrequired

The deps passed to run() or stream(): host-only values such as clients. Never serialized; undefined (TypeScript) or None (Python) when none were passed.

threadId / thread_idThreadIdrequired

The thread this run appends to.

branchId / branch_idBranchIdrequired

The branch of that thread this run appends to.

principalPrincipalrequired

A verified identity, normalized by the host.

callId / call_idCallId

Set inside a tool or tool hook.

effectKey / effect_keystring

<branch_id>:<call_id>; send it to providers that dedup.

signalAbortSignalrequired

TypeScript only. Aborts when the run's signal option aborts; pass it on to fetch or other cancellable work. It never aborts when run() had no signal.

Edit on GitHub

On this page