Skip to content

fix(langfuse): capture turn output#2

Merged
wochinge merged 2 commits into
mainfrom
verify-root-span-output
Jun 30, 2026
Merged

fix(langfuse): capture turn output#2
wochinge merged 2 commits into
mainfrom
verify-root-span-output

Conversation

@wochinge

Copy link
Copy Markdown
Contributor

Summary

  • Capture the final assistant response on the root opencode.turn span so the turn has both input and output, matching the behavior expected from Langfuse integrations.
  • Reuse the same assistant output payload for the turn span and generation span, and centralize turn lookup through getTurnObservation.

Linear

  • None

Major Decisions

  • Keep output capture on successful generation completion rather than changing turn lifecycle handling, since that is the point where the assistant response text is available.

Review Focus

  • Confirm the fallback from parentID to the latest session turn matches OpenCode event ordering.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 636a24dedd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/langfuse.ts Outdated
@wochinge wochinge merged commit 7fe31bd into main Jun 30, 2026
4 checks passed
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.

1 participant