TraceContext documents automatic task-local propagation at Sources/ARCP/Trace/TraceContext.swift:4, and the observability guide says envelopes built inside Tracing.withTrace inherit the trace automatically at docs/guides/observability.md:68. Envelope.init defaults traceId, spanId, and parentSpanId to nil at Sources/ARCP/Envelope/Envelope.swift:28 and never reads Tracing.current. JobManager stores the inbound trace id on JobRecord at Sources/ARCP/Runtime/JobManager.swift:188, but lifecycle and handler-emitted envelopes are built without trace fields, so runtime responses, logs, metrics, progress, and result chunks drop the trace.
Fix prompt: Wire Tracing.current into envelope construction or into the client and runtime send paths so default trace fields are populated when callers do not pass explicit values. Preserve inbound trace context from tool.invoke across job.accepted, job.started, handler context emissions, and terminal job envelopes. Add tests for Tracing.withTrace around ARCPClient.invoke and for runtime propagation from an inbound traced invocation through progress and terminal events.
TraceContextdocuments automatic task-local propagation atSources/ARCP/Trace/TraceContext.swift:4, and the observability guide says envelopes built insideTracing.withTraceinherit the trace automatically atdocs/guides/observability.md:68.Envelope.initdefaultstraceId,spanId, andparentSpanIdto nil atSources/ARCP/Envelope/Envelope.swift:28and never readsTracing.current.JobManagerstores the inbound trace id onJobRecordatSources/ARCP/Runtime/JobManager.swift:188, but lifecycle and handler-emitted envelopes are built without trace fields, so runtime responses, logs, metrics, progress, and result chunks drop the trace.Fix prompt: Wire
Tracing.currentinto envelope construction or into the client and runtime send paths so default trace fields are populated when callers do not pass explicit values. Preserve inbound trace context fromtool.invokeacrossjob.accepted,job.started, handler context emissions, and terminal job envelopes. Add tests forTracing.withTracearoundARCPClient.invokeand for runtime propagation from an inbound traced invocation through progress and terminal events.