Skip to content

Flatten Claude trace spans for user turns#2

Merged
adagradschool merged 3 commits into
masterfrom
fix/flatten-nested-spans
Mar 11, 2026
Merged

Flatten Claude trace spans for user turns#2
adagradschool merged 3 commits into
masterfrom
fix/flatten-nested-spans

Conversation

@adagradschool
Copy link
Copy Markdown
Contributor

Summary

Update the Claude Code plugin for the flattened trace UI:

  • remove the synthetic Turn span
  • emit tool and LLM spans directly under the session span
  • label the first span after human input as LLM Call (User)
  • make user prompt text render more cleanly in flattened spans

Why

In the flattened view, the turn wrapper adds noise. This makes each user prompt show up as its own top-level call with the first resulting Claude response or tool call, without backend changes.

Testing

  • python3 -m py_compile plugins/pl-trace-claude-code/hooks/parse_stop_transcript.py
  • make test

@adagradschool adagradschool requested a review from T3XRD March 11, 2026 18:35
@adagradschool adagradschool merged commit cad1599 into master Mar 11, 2026
2 checks passed
@adagradschool adagradschool deleted the fix/flatten-nested-spans branch March 12, 2026 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants