From c30ca0d5b63e6daa81785954400b14ab59a98db7 Mon Sep 17 00:00:00 2001 From: zhao-oai Date: Thu, 20 Nov 2025 16:39:16 -0500 Subject: [PATCH] increasing user shell timeout to 1 hour (#7025) setting user shell timeout to an unreasonably high value since there isn't an easy way to have a command run without timeouts currently, user shell commands timeout is 10 seconds --- codex-rs/core/src/tasks/user_shell.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/codex-rs/core/src/tasks/user_shell.rs b/codex-rs/core/src/tasks/user_shell.rs index 9644d3678..190578c37 100644 --- a/codex-rs/core/src/tasks/user_shell.rs +++ b/codex-rs/core/src/tasks/user_shell.rs @@ -31,6 +31,8 @@ use crate::user_shell_command::user_shell_command_record_item; use super::SessionTask; use super::SessionTaskContext; +const USER_SHELL_TIMEOUT_MS: u64 = 60 * 60 * 1000; // 1 hour + #[derive(Clone)] pub(crate) struct UserShellCommandTask { command: String, @@ -93,7 +95,7 @@ impl SessionTask for UserShellCommandTask { command: command.clone(), cwd: cwd.clone(), env: create_env(&turn_context.shell_environment_policy), - timeout_ms: None, + timeout_ms: Some(USER_SHELL_TIMEOUT_MS), sandbox: SandboxType::None, with_escalated_permissions: None, justification: None,