Skip to content

Add session context and lifecycle events to traces - #205

Merged
Stephen Belanger (Qard) merged 3 commits into
mainfrom
feat/trace-session-context-events
Oct 20, 2026
Merged

Stephen Belanger (Qard) merged 3 commits into
mainfrom
feat/trace-session-context-events

Conversation

@Qard

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

Copy link
Copy Markdown
Collaborator

Summary

  • Capture Pi model and working directory on root spans, including context learned after root creation.
  • Emit a tagged Claude Code compaction span at PostCompact.
  • Record Claude turn outcome and root session status as completed, interrupted, or errored; classify interruption reasons without putting them in error.
  • Add input_kind to Claude turns when the hook provides a recognized source or a task notification marker.

Context

The debugging packet showed missing root segmentation metadata, absent explicit Claude compaction events, and interruption/status information available only through later prompt text. This change uses available native hook and Pi context fields without substituting API-key identity for a user identity.

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:16:59.630123Z 4bf47e1 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.

@Qard
Stephen Belanger (Qard) force-pushed the feat/trace-session-context-events branch from 4bf47e1 to e15a523 Compare October 20, 2026 15:14

@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: 4bf47e1ca5

ℹ️ 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/claude.rs
Comment thread bt-daemon/src/translate/claude.rs Outdated
Comment thread bt-daemon/src/translate/claude.rs Outdated
Comment thread bt-daemon/src/translate/claude.rs Outdated
@Qard
Stephen Belanger (Qard) merged commit 83c77a0 into main Oct 20, 2026
22 checks passed
@Qard
Stephen Belanger (Qard) deleted the feat/trace-session-context-events branch October 20, 2026 16:43
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