You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Child agent sessions produce isolated traces — no linkage to parent trace #8
When a parent agent spawns child agents (sub-agents), each child session creates an independent
trace with its own traceId. There is no way to view the full parent → child orchestration as a
single connected trace in Langfuse.
Expected Behavior
Child agent sessions should be linked to the parent session's trace, so the entire multi-agent call
chain is visible as one trace in the Langfuse UI.
Current Behavior
A multi-agent workflow (e.g., 1 parent + 3 child agents) produces 4 completely disconnected traces.
There is no correlation between them — the parent trace has no reference to child traces, and vice
versa.
Hi @x-xiang, thanks for the report! I already noticed this and am planning to spend some time next week updating the behavior here, along with making a few more general improvements.
Hi @x-xiang, thanks for the report! I already noticed this and am planning to spend some time next week updating the behavior here, along with making a few more general improvements.
Thanks for the quick response! Glad to hear it's already on your radar. Looking forward to the update — happy to help test when it's ready.
Hi @x-xiang, just wanted to share an update here. I released v0.2.0, but it doesn’t yet include fixes for sub-agent tracing. I hope to find some time in the coming weeks to give it another go :)
Thanks for the update, and no rush at all — really appreciate you keeping the issue posted.
I’d be happy to help test it whenever you get a chance to revisit it.
Hi @idityaGE, I took the required steps to open up the plugin to external contributions. Could you open a PR, sounds like you're changes would be helpful!
Hi @idityaGE, I took the required steps to open up the plugin to external contributions. Could you open a PR, sounds like you're changes would be helpful!
Activity
bezbac commentedon Jul 17, 2026
Hi @x-xiang, thanks for the report! I already noticed this and am planning to spend some time next week updating the behavior here, along with making a few more general improvements.
x-xiang commentedon Jul 17, 2026
Thanks for the quick response! Glad to hear it's already on your radar. Looking forward to the update — happy to help test when it's ready.
bezbac commentedon Aug 7, 2026
Hi @x-xiang, just wanted to share an update here. I released v0.2.0, but it doesn’t yet include fixes for sub-agent tracing. I hope to find some time in the coming weeks to give it another go :)
x-xiang commentedon Aug 7, 2026
Thanks for the update, and no rush at all — really appreciate you keeping the issue posted.
I’d be happy to help test it whenever you get a chance to revisit it.
idityaGE commentedon Aug 9, 2026
Hi @bezbac, I worked on a fix for this issue and manually verified it against the Langfuse UI.
Proposed fix branch:
https://github.com/idityaGE/opencode-observability-plugin/tree/fix-child-session-parenting
Compare:
main...idityaGE:opencode-observability-plugin:fix-child-session-parenting
I tried to open a PR, but GitHub returned:
Could you please enable/allow PRs from my fork, or let me know the preferred way to contribute this change?
Summary of the fix:
session.created/session.updatedparent session IDs.opencode.turnspans under the active parent trace when available.session.idlefinalize only that session so child sessions do not clear parent trace state.Validation:
npx pnpm run formatnpx pnpm run buildnpx pnpm run test:integrationwith 14 passing testsBefore:

After:

bezbac commentedon Aug 18, 2026
Hi @idityaGE, I took the required steps to open up the plugin to external contributions. Could you open a PR, sounds like you're changes would be helpful!
idityaGE commentedon Aug 18, 2026
PR#27
bezbac commentedon Aug 20, 2026
This was released as part of v0.3.0.
You might need to update your OpenCode config to explicitly reference this version if you’ve already used a prior version.