Skip to content

nestedRunDepth

nestedRunDepth(ctx): object

Defined in: packages/sdk/src/run.ts:484

The depth, maxDepth and parentRun options for a run that a tool starts: one level deeper than the tool’s own run, under the same cap, and named after the tool call that starts it. Spread it into the nested run(); the nested run throws max_depth_exceeded when the tool was already at maxDepth. A context without runId and callId gets no parentRun.

Pick<ToolContext<unknown>, "depth" | "maxDepth"> & Partial<Pick<ToolContext<unknown>, "callId" | "runId">>

object

depth: number

maxDepth: number

optional parentRun?: ParentRun

These docs are licensedCC BY 4.0. Thelicence text is in the repository.