RunContext
What your tool or hook receives about the run it is part of.
Fields
depsDepsrequiredThe 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_idThreadIdrequiredThe thread this run appends to.
branchId / branch_idBranchIdrequiredThe branch of that thread this run appends to.
principalPrincipalrequiredA verified identity, normalized by the host.
callId / call_idCallIdSet inside a tool or tool hook.
effectKey / effect_keystring<branch_id>:<call_id>; send it to providers that dedup.
signalAbortSignalrequiredTypeScript 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.