Skip to content

fix: capture reasoning text from content parts#5

Open
royalpinto007 wants to merge 1 commit into
traceroot-ai:mainfrom
royalpinto007:fix/reasoning-content-array
Open

fix: capture reasoning text from content parts#5
royalpinto007 wants to merge 1 commit into
traceroot-ai:mainfrom
royalpinto007:fix/reasoning-content-array

Conversation

@royalpinto007

@royalpinto007 royalpinto007 commented Jul 1, 2026

Copy link
Copy Markdown

Summary

Closes #4.

This PR updates transcript parsing so reasoning response items with text inside content parts are captured in parsed model steps.

Before

Reasoning items that used content arrays were parsed without reasoning text.

Result: step.reasoning stayed undefined, even though the payload contained useful reasoning text.

After

The parser now reads text from reasoning content parts and joins them into the model step reasoning field.

Example result:

Check the transcript shape.
Then emit the trace.

Why

Reasoning text is useful observability context. Dropping it makes traces less complete and can make Codex runs harder to debug.

Testing

  • pnpm test -- plugins/tracing/test/transcript.test.ts
  • pnpm run typecheck
  • pnpm run build

Summary by cubic

Fixes transcript parsing to capture reasoning text from content arrays in reasoning response items. Parsed steps now include complete reasoning, improving trace clarity.

  • Bug Fixes
    • Parse reasoning content arrays and collect text values alongside summary and string content, joining with newlines into step.reasoning.
    • Added test to ensure reasoning from content parts is captured.

Written for commit 907d1e1. Summary will update on new commits.

Review in cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

Re-trigger cubic

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.

Reasoning text from content parts is dropped

1 participant