Skip to content

[codex] simplify memory read metrics#28164

Merged
pakrym-oai merged 5 commits into
mainfrom
pakrym/full-ci-simplify-memory-usage
Jun 15, 2026
Merged

[codex] simplify memory read metrics#28164
pakrym-oai merged 5 commits into
mainfrom
pakrym/full-ci-simplify-memory-usage

Conversation

@pakrym-oai

@pakrym-oai pakrym-oai commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator

Why

Memory read telemetry currently reconstructs the executable shell command after a tool call finishes. That duplicates shell, login-policy, and cwd resolution owned by the tool handlers, and can diverge from the environment-specific command that unified exec actually ran.

What changed

  • Expose the existing restricted shell-script parser directly for raw script text.
  • Parse shell_command and exec_command input into plain command argv before classifying memory reads.
  • Preserve all-or-nothing safe-command validation for multi-command scripts.
  • Remove cwd resolution, shell selection, and the unnecessary async boundary from memory read metric emission.

Testing

  • just test -p codex-shell-command
  • cargo check -p codex-core

@pakrym-oai pakrym-oai marked this pull request as ready for review June 14, 2026 06:12
@pakrym-oai pakrym-oai requested a review from a team as a code owner June 14, 2026 06:12
@pakrym-oai pakrym-oai marked this pull request as draft June 14, 2026 06:13
@pakrym-oai pakrym-oai marked this pull request as ready for review June 14, 2026 06:13

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

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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 48bcf9ab3a

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread codex-rs/core/src/memory_usage.rs Outdated
@pakrym-oai pakrym-oai merged commit 42ad752 into main Jun 15, 2026
61 of 78 checks passed
@pakrym-oai pakrym-oai deleted the pakrym/full-ci-simplify-memory-usage branch June 15, 2026 15:28
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 15, 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.

2 participants