From dae26c9e8b0c1a1fab325d73b598f8f9ae9d3834 Mon Sep 17 00:00:00 2001 From: jif-oai Date: Thu, 19 Feb 2026 18:44:48 +0000 Subject: [PATCH] chore: increase stack size for everyone (#12254) --- codex-rs/arg0/src/lib.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/codex-rs/arg0/src/lib.rs b/codex-rs/arg0/src/lib.rs index 956373783..dd89baeff 100644 --- a/codex-rs/arg0/src/lib.rs +++ b/codex-rs/arg0/src/lib.rs @@ -12,8 +12,7 @@ const LINUX_SANDBOX_ARG0: &str = "codex-linux-sandbox"; const APPLY_PATCH_ARG0: &str = "apply_patch"; const MISSPELLED_APPLY_PATCH_ARG0: &str = "applypatch"; const LOCK_FILENAME: &str = ".lock"; -#[cfg(target_os = "windows")] -const WINDOWS_TOKIO_WORKER_STACK_SIZE_BYTES: usize = 16 * 1024 * 1024; +const TOKIO_WORKER_STACK_SIZE_BYTES: usize = 16 * 1024 * 1024; /// Keeps the per-session PATH entry alive and locked for the process lifetime. pub struct Arg0PathEntryGuard { @@ -129,12 +128,7 @@ where fn build_runtime() -> anyhow::Result { let mut builder = tokio::runtime::Builder::new_multi_thread(); builder.enable_all(); - #[cfg(target_os = "windows")] - { - // Defensive hardening: Windows worker threads have lower effective - // stack headroom, so use a larger stack for runtime workers. - builder.thread_stack_size(WINDOWS_TOKIO_WORKER_STACK_SIZE_BYTES); - } + builder.thread_stack_size(TOKIO_WORKER_STACK_SIZE_BYTES); Ok(builder.build()?) }