# Keep parent trace attribution correct when spans share a trace

> A child agent's spans no longer overwrite the parent trace's session_id, agent_id, or team_id when both share a trace_id.

- Published: 2026-05-15
- Author: Agno Team
- Category: Changelog
- Canonical: https://agno-com-nine.vercel.app/articles/keep-parent-trace-attribution-correct-when-spans-share-a-trace
- Markdown: https://agno-com-nine.vercel.app/articles/keep-parent-trace-attribution-correct-when-spans-share-a-trace.md

A child agent's spans no longer overwrite the parent trace's `session_id`, `agent_id`, or `team_id` when both share a `trace_id`. The fix shows up most clearly when a Team uses a background post-hook such as `@hook(run_in_background=True)`, where the parent trace now holds onto its own identifiers instead of inheriting the child's.
