# What happens if a span's parent arrives after its children?

Tessary reattaches them: once the parent lands, it pulls the whole detached subtree back and resolves it level by level, as if everything had shipped in order.

This matters because a [span](/answers/instrumentation/whats-the-difference-between-a-trace-and-a-span) ships when it ends, not when it starts, so a long agent turn or a queue-consumer step can log its children seconds before it logs itself. Tessary waits a short settle window after the last span lands, a shorter one once a root span has shipped, before it decides a missing parent isn't coming and marks that parent's children unresolved. If the real parent then arrives late, its own write is what triggers the fix, no replay or re-ingest needed, and a child that was itself still missing its own parent stays unresolved rather than getting pulled back twice.

The one case this doesn't cover: if the parent never arrives at all, its children stay unresolved for good, since there's nothing left to attach them to.

---

Published: 2026-10-13

Sources:
- Tessary commit 7c69d93, "A parent that arrives after its children were retired as orphans takes them back": https://github.com/tessaryai/tessary/commit/7c69d93d1c616635696f700885eb7db0cf3f9e56 (fetched 2026-10-13)

Source: https://tessary.ai/answers/tessary-traces/what-happens-if-a-spans-parent-arrives-after-its-children
More on Tessary traces: https://tessary.ai/answers/tessary-traces
From Tessary, agent reliability for AI agents in production: https://tessary.ai
