Skip to content

fix(tracing): capture failed CommandExecution items - #127

Open
CNSeniorious000 wants to merge 1 commit into
langfuse:mainfrom
CNSeniorious000:fix/command-execution-status
Open

CNSeniorious000 wants to merge 1 commit into
langfuse:mainfrom
CNSeniorious000:fix/command-execution-status

Conversation

@CNSeniorious000

Copy link
Copy Markdown

Failed CommandExecution items are ignored by the item_completed handler, so the matching tool observation can remain at DEFAULT even when Codex records a failure.

Read failed / declined completions and fill the existing tool call's error by exact ID. Exclude user_shell, preserve existing errors, output, and timing, and leave legacy completion handling unchanged. Unmatched IDs do not create tools or propagate errors to a code-mode wrapper; cross-turn completions remain out of scope.

Tests

  • Cover failure-detail fallbacks, declined calls, unrelated IDs, user-shell events, non-failure states, existing errors, and cross-turn isolation.
  • Verify the original exec is ERROR without mislabeling a later write_stdin call.
  • pnpm run lint and pnpm test pass (136 tests).
  • Bundled Stop hook → local OTLP receiver: verify error attribution, sidecar writes, and repeat-Stop deduplication. The error-level assertion fails on unmodified v0.4.3.

@claude claude 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.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@CLAassistant

CLAassistant commented Nov 1, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-01T21:40:11.111182Z 5ae00ad PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@sangkyoonnam sangkyoonnam 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.

The new tests do catch the bug. With the parent versions of parse.ts and types.ts, 5 of the PR's new tests fail; with the head versions, they pass.

I ran pnpm --config.manage-package-manager-versions=false exec vitest run plugins/tracing/test/parse.test.ts plugins/tracing/test/trace.test.ts on the head three times: 76 passed each time. Then I reverted only parse.ts and types.ts to the parent version (the tests stay at head) and ran the same command three more times: 5 failed, 71 passed each time, and the same 5 failed every run. Those are the four records CommandExecution cases and the trace.test.ts ERROR-level test. The other 71 tests pass on both versions.

Comment thread plugins/tracing/src/parse.ts Resolved

This branch has not been deployed

No deployments
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.

3 participants