mirror of
https://github.com/openai/codex.git
synced 2026-11-17 14:58:36 +00:00
[codex] simplify memory read metrics (#28164)
## 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`
This commit is contained in:
1 parent
bbcfed8ac2
commit
42ad752f36
6 files changed
+36
-58
No files matched your search
@@ -569,7 +569,7 @@ impl ToolRegistry {
|
||||
Ok((_, success)) => *success,
|
||||
Err(_) => false,
|
||||
};
|
||||
emit_metric_for_tool_read(&invocation, success).await;
|
||||
emit_metric_for_tool_read(&invocation, success);
|
||||
let post_tool_use_payload = if success {
|
||||
let guard = response_cell.lock().await;
|
||||
guard
|
||||
|
||||
Reference in new issue
Block a user