{"record":{"id":"abee9bc99310a7c5","repo":"zed-industries/zed","slug":"wsl-did-not-respond-within-seconds-while-prepar","errorCode":null,"errorMessage":"WSL did not respond within {} seconds while preparing the sandboxed command","messagePattern":"WSL did not respond within (.+?) seconds while preparing the sandboxed command","errorType":"exception","errorClass":"SandboxError::WslUnavailable","httpStatus":null,"severity":"error","filePath":"crates/acp_thread/src/acp_thread.rs","lineNumber":4559,"sourceCode":"                    if sandbox_wrap.is_some() {\n                        let (task_command, task_args) = task::ShellBuilder::new(\n                            &Shell::Program(\"/bin/sh\".to_string()),\n                            false,\n                        )\n                        .non_interactive()\n                        .redirect_stdin_to_dev_null()\n                        .build(Some(command.clone()), &args);\n                        let wrap = cx.background_spawn(prepare_sandbox_wrap(\n                            task_command,\n                            task_args,\n                            cwd.clone(),\n                            sandbox_wrap,\n                            env,\n                        ));\n                        let timeout = cx.background_executor().timer(WSL_SANDBOX_WRAP_TIMEOUT);\n                        let (task_command, task_args, task_env, sandbox) = futures::select_biased! {\n                            result = wrap.fuse() => result?,\n                            _ = timeout.fuse() => return Err(anyhow::Error::new(\n                                sandbox::SandboxError::WslUnavailable(format!(\n                                    \"WSL did not respond within {} seconds while preparing the sandboxed command\",\n                                    WSL_SANDBOX_WRAP_TIMEOUT.as_secs()\n                                )),\n                            )),\n                        };\n                        (task_command, task_args, task_env, sandbox, None)\n                    } else {\n                        // No sandbox wrap means we're running unsandboxed, and\n                        // on Windows that deliberately changes the shell: the\n                        // sandboxed path runs under WSL's Linux bash, but this\n                        // fallback uses the host's `shell` against the native cwd.\n                        let mut builder = ShellBuilder::new(&Shell::Program(shell), is_windows);\n                        if headless {\n                            builder = builder.non_interactive();\n                        }\n                        let (task_command, task_args) = builder\n                            .redirect_stdin_to_dev_null()","sourceCodeStart":4541,"sourceCodeEnd":4577,"githubUrl":"https://github.com/zed-industries/zed/blob/9d272b036335401f339d024ea94968fd51016c40/crates/acp_thread/src/acp_thread.rs#L4541-L4577","documentation":"Raised while preparing a sandboxed command on WSL: the WSL-side preparation (path resolution/sandbox wrap setup) did not respond within the configured number of seconds, so the command launch is aborted with the timeout embedded.","triggerScenarios":"Thrown at crates/acp_thread/src/acp_thread.rs:4461 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the command; first-run provisioning is slow but subsequent runs are fast","Pre-warm the WSL distro and helper so sandbox prep stays under the timeout","Check WSL health (wsl --status) if the distro consistently hangs"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9d272b036335401f339d024ea94968fd51016c40","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}