Skip to content

[codex-analytics] emit tool item events from item lifecycle#20481

Closed
rhan-oai wants to merge 4 commits intomainfrom
pr20481
Closed

[codex-analytics] emit tool item events from item lifecycle#20481
rhan-oai wants to merge 4 commits intomainfrom
pr20481

Conversation

Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

if let Some(analytics_events_client) = analytics_events_client.as_ref() {

P0 Badge Remove stale analytics variable references

apply_bespoke_event_handling no longer takes analytics_events_client, but this match arm still reads analytics_events_client.as_ref(). That unresolved identifier causes a compile failure (same issue also appears in warning/guardian-warning arms), blocking build and release.

ℹ️ 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 on lines +1641 to +1644
self.turn_item_started_at_ms
.lock()
.await
.insert(item.id(), started_at_ms);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Badge Restrict start-time tracking to completable turn items

emit_turn_item_started stores every item ID in turn_item_started_at_ms, but some item types only emit a start event (e.g. ContextCompaction in core/src/compact.rs and core/src/compact_remote.rs) and never call emit_turn_item_completed. Those IDs are never removed, so long-lived sessions leak memory as compactions accumulate.

Useful? React with 👍 / 👎.

@rhan-oai
Copy link
Copy Markdown
Collaborator Author

Closing duplicate stack created during resubmission; canonical PR remains #17090.

@rhan-oai rhan-oai closed this Apr 30, 2026
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