- TypeScript
- Python
- Each tool execution gets its own
tool.callchild span with name, args, and result. - The run span closes only after the whole loop finishes, so all turns are captured.
- If the loop throws, the run span is ended and marked as errored automatically. Call
recordError(err)/ctx.record_error(err)before re-raising if you want to attach the error explicitly.

