Session IDs
A session ID is the stable identifier Dynamo uses for one agent reasoning/tool chain. A root agent, planner, researcher subagent, or OpenCode subtask can each have its own session. Every LLM request in that chain should carry the same session_id; child sessions can also carry a parent_session_id so traces and replay tools can rebuild the tree. Some academic papers also call this a program_id.
Session identity is passive metadata unless session affinity is explicitly enabled.
Sending X-Dynamo-Session-ID alone does not change request placement. Tracing records
the identity when DYN_REQUEST_TRACE is enabled. When
--router-session-affinity-ttl-secs is configured, the router uses the ID for an
immutable endpoint- and phase-scoped worker binding.
Session ID Inputs
Custom clients should send the canonical Dynamo headers. When X-Dynamo-Session-ID is present, Dynamo uses it and X-Dynamo-Parent-Session-ID instead of any agent-native identity values.
Native Agent Headers
Dynamo also recognizes the current stable identity headers emitted by the following coding agents. The frontend API surface compliance test catches header changes as coding agents evolve.
X-Dynamo-Session-Final applies with either canonical or agent-native session
identity. With session affinity enabled, a final request routes normally and then
terminally closes its binding. Close invalidation across replicas is eventual. Do not
send more requests with that session ID after close.
etcd and FileStore on a shared filesystem coordinate bindings across frontend processes. MemoryStore and Kubernetes discovery retain process-local affinity only. The affinity TTL controls local cache cleanup, not the distributed claim lifetime. Claims follow the creating frontend’s etcd lease or FileStore ownership. If a claim expires or its bound worker disappears, create a new session with a new ID instead of reusing or rebinding the old ID. See Router session affinity for the full contract.
Custom Agent Harnesses
For a custom HTTP client that only needs a session ID, send the generic header: