Skip to content

Conversation

dylan-hurd-oai
Copy link
Collaborator

Summary

Small update to hopefully improve some shell edge cases, and make the function clearer to the model what is going on. Keeping timeout as an alias means that calls with the previous name will still work.

Test Plan

  • Tested locally, model still works

@dylan-hurd-oai dylan-hurd-oai added the codex-rust-review Perform a detailed review of Rust changes. label Aug 22, 2025
@github-actions github-actions bot added codex-rust-review-in-progress and removed codex-rust-review Perform a detailed review of Rust changes. labels Aug 22, 2025
Copy link

Summary
Standardizes the shell tool’s timeout to milliseconds and improves the tool schema. Adds descriptions for fields and keeps backward compatibility by accepting legacy timeout during deserialization.

  • codex-rs/core/src/models.rs: Updated doc to ms; switched #[serde(rename = "timeout")] to #[serde(alias = "timeout")] for timeout_ms.
  • codex-rs/core/src/openai_tools.rs: Renamed schema key to timeout_ms; added descriptions for command, workdir, and timeout_ms; mirrored in sandbox variant.

Review
Clear, focused change with a good PR body explaining motivation and compatibility. Nicely improves schema clarity while maintaining ingestion of older calls.

  • Prefer "literal".into() over to_string() for brevity in new descriptions.
  • Consider adding a small unit test to deserialize both {"timeout": ...} and {"timeout_ms": ...} into ShellToolCallParams.

Follow-up (outside this PR scope)

  • The justification description references ask_for_escalated_permissions; align wording with with_escalated_permissions.
  • Consider deduplicating shared schema construction between create_shell_tool and its sandbox variant.

View workflow run

@dylan-hurd-oai dylan-hurd-oai merged commit 9f71dcb into main Aug 22, 2025
16 checks passed
@dylan-hurd-oai dylan-hurd-oai deleted the dh--shell-call-patch-1 branch August 22, 2025 02:58
@github-actions github-actions bot locked and limited conversation to collaborators Aug 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants