Skip to content

[codex] simplify memory read metrics#28164

Open
pakrym-oai wants to merge 5 commits into
mainfrom
pakrym/full-ci-simplify-memory-usage
Open

[codex] simplify memory read metrics#28164
pakrym-oai wants to merge 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
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