Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions codex-rs/core/src/tools/handlers/shell_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ pub(crate) fn create_exec_command_tool_with_environment_id(
include_environment_id: bool,
include_shell_parameter: bool,
) -> ToolSpec {
let yield_time_ms_description = if cfg!(windows) {
"Maximum time to wait before returning a session ID for a still-running command. Commands that finish sooner return immediately. For ordinary commands, omit this parameter to use the 10000 ms default. Set a shorter value only when intentionally starting a long-lived or interactive process and you want a session ID promptly."
} else {
"Wait before yielding output. Defaults to 10000 ms; effective range is 250-30000 ms."
};
let mut properties = BTreeMap::from([
(
"cmd".to_string(),
Expand All @@ -44,9 +49,7 @@ pub(crate) fn create_exec_command_tool_with_environment_id(
),
(
"yield_time_ms".to_string(),
JsonSchema::number(Some(
"Wait before yielding output. Defaults to 10000 ms; effective range is 250-30000 ms.".to_string(),
)),
JsonSchema::number(Some(yield_time_ms_description.to_string())),
),
(
"max_output_tokens".to_string(),
Expand Down
9 changes: 6 additions & 3 deletions codex-rs/core/src/tools/handlers/shell_spec_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ fn exec_command_tool_matches_expected_spec() {
"Runs a command in a PTY, returning output or a session ID for ongoing interaction."
.to_string()
};
let yield_time_ms_description = if cfg!(windows) {
"Maximum time to wait before returning a session ID for a still-running command. Commands that finish sooner return immediately. For ordinary commands, omit this parameter to use the 10000 ms default. Set a shorter value only when intentionally starting a long-lived or interactive process and you want a session ID promptly."
} else {
"Wait before yielding output. Defaults to 10000 ms; effective range is 250-30000 ms."
};

let mut properties = BTreeMap::from([
(
Expand Down Expand Up @@ -57,9 +62,7 @@ fn exec_command_tool_matches_expected_spec() {
),
(
"yield_time_ms".to_string(),
JsonSchema::number(Some(
"Wait before yielding output. Defaults to 10000 ms; effective range is 250-30000 ms.".to_string(),
)),
JsonSchema::number(Some(yield_time_ms_description.to_string())),
),
(
"max_output_tokens".to_string(),
Expand Down
Loading