# stream_trace_config

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/_tracing/stream_trace_config)

Mark a graph invocation as an interrupt-resume round when it is one.

A turn's initial run stays untagged, so the tag identifies continuations
rather than the turn itself. Keep that asymmetry: tagging unconditionally
would erase the distinction this exists to draw.

LangGraph treats `tags` as inheritable and unions them onto every child
config, so the tag also reaches the model, tool, and subagent runs beneath a
resume. Pair it with an `is_root` filter to select resume roots alone.

## Signature

```python
stream_trace_config(
    config: RunnableConfig,
    stream_input: Any,
) -> RunnableConfig
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `config` | `RunnableConfig` | Yes | Runnable config for this graph invocation. Callers pass the same object across a turn's rounds so the rounds share trace metadata. The `/offload` path passes a thread-only config that carries no `metadata`, so its rounds group by `thread_id` alone. |
| `stream_input` | `Any` | Yes | Graph input for this round. A `Command` marks a resume; anything else starts a run. |

## Returns

`RunnableConfig`

`config` itself for an initial run. For a resume, a shallow copy whose
`tags` carries `RESUME_TRACE_TAG` exactly once. The copy shares
`metadata` and `configurable` with `config` by reference, so do not
mutate those through the result.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/caaa7e7c12d214afa5cf0a1afed8eb6232aa6f7b/libs/code/deepagents_code/_tracing.py#L24)