Skip to content

Separate human waits from tool time and cap dangling spans - #204

Merged
Stephen Belanger (Qard) merged 1 commit into
mainfrom
fix/trace-wait-durations
Oct 20, 2026
Merged

Stephen Belanger (Qard) merged 1 commit into
mainfrom
fix/trace-wait-durations

Conversation

@Qard

@Qard Stephen Belanger (Qard) commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Represent Claude Code AskUserQuestion spans as wait spans internally and emit them as Braintrust task spans tagged with wait_kind=user_question, keeping human response time out of tool execution time.
  • Cap Codex tool spans that close without output at 24 hours, including finalization paths with no observed terminal timestamp.
  • Start resumed Codex session roots no earlier than the first event observed by this daemon session.

Context

The debugging packet showed user response intervals folded into Claude tool durations, Codex tool spans lasting many days, and resumed Codex roots with starts far earlier than their observed creation time.

Validation

cargo check --manifest-path bt-daemon/Cargo.toml passed. Tests were not run.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 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-10-20T15:06:39.213590Z a3ea0bf PR opened
ℹ️ About Codex in GitHub

Your 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.

@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: a3ea0bf524

ℹ️ 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 (@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 (@codex) address that feedback".

Comment thread bt-daemon/src/translate/codex.rs Outdated
Comment thread bt-daemon/src/translate/claude.rs
@Qard
Stephen Belanger (Qard) force-pushed the fix/trace-wait-durations branch 2 times, most recently from 1b49a71 to 930cff2 Compare October 20, 2026 15:14

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

good catch

@Qard
Stephen Belanger (Qard) merged commit 0abe88c into main Oct 20, 2026
22 checks passed
@Qard
Stephen Belanger (Qard) deleted the fix/trace-wait-durations branch October 20, 2026 16:25
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