Repository navigation
Keep Claude lifecycle termination out of span errors - #203
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Stephen Belanger (Qard)
force-pushed
the
fix/trace-error-outcomes
branch
2 times, most recently
from
October 20, 2026 15:39
94a0431 to
b797fbb
Compare
Abhijeet Prasad (AbhiPrasad)
approved these changes
Oct 20, 2026
Stephen Belanger (Qard)
force-pushed
the
fix/trace-error-outcomes
branch
from
October 20, 2026 16:48
5e5bea5 to
98dfd67
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Context
The debugging packet showed Claude task spans labeled
Session ended before turn completioneven when later turns ran in the same session. The daemon's idle reaper emits aRetirecontrol to release resources, but the translation pipeline treated that as terminal finalization. Claude also ended its session root after each turn. These are resource/turn boundaries, not proof that the native session ended. Retirement now checkpoints buffered observations without closing native spans; later activity can continue the same deterministic root. An explicitSessionEndcloses that root, and a later reopened lifecycle gets a new root ID because the SDK update path cannot clear an already-writtenmetrics.end.The packet's empty-string tool errors and Codex exit-code misses are not reproduced in current source: Claude filters empty error text and Codex classifies nonzero
exit_codeoutput already.Validation
cargo check --manifest-path bt-daemon/Cargo.toml,cargo fmt --manifest-path bt-daemon/Cargo.toml --check, andgit diff --checkpassed. Tests were not run.