Skip to content

Add memory tool call metrics to memories extension#24583

Merged
jif-oai merged 3 commits into
mainfrom
jif/extension-metrics-memories
May 26, 2026
Merged

Add memory tool call metrics to memories extension#24583
jif-oai merged 3 commits into
mainfrom
jif/extension-metrics-memories

Conversation

@jif-oai
Copy link
Copy Markdown
Collaborator

@jif-oai jif-oai commented May 26, 2026

Why

The memories extension now receives a metrics exporter, but the useful extension-owned signal is the memory tool call itself: which operation ran, which memory area it touched, whether the backend call succeeded, and whether the result was truncated.

What changed

  • Added the codex.memories.tool.call counter in ext/memories/src/metrics.rs.
  • Emit that counter from memories/add_ad_hoc_note, memories/list, memories/read, and memories/search after backend execution.
  • Tag each call with tool, operation, scope, status, and truncated.
  • Pass the existing MetricsClient through the memories extension into the tool executors; tests use None.

Verification

  • just test -p codex-memories-extension

@jif-oai jif-oai changed the title feat: add metrics to memories extension Add memory tool call metrics to memories extension May 26, 2026
@jif-oai
Copy link
Copy Markdown
Collaborator Author

jif-oai commented May 26, 2026

@codex review

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

Here are some automated review suggestions for this pull request.

Reviewed commit: a277f8962b

ℹ️ 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 thread codex-rs/ext/memories/src/tests.rs Outdated
@jif-oai jif-oai merged commit 01a8bf0 into main May 26, 2026
30 checks passed
@jif-oai jif-oai deleted the jif/extension-metrics-memories branch May 26, 2026 13:27
@github-actions github-actions Bot locked and limited conversation to collaborators May 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant