{"record":{"id":"c0628db6fae85cc8","repo":"warpdotdev/warp","slug":"file-glob-operation-timed-out","errorCode":null,"errorMessage":"File glob operation timed out","messagePattern":"File glob operation timed out","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"app/src/ai/blocklist/action_model/execute/file_glob.rs","lineNumber":141,"sourceCode":"        let absolute_path = shell_native_absolute_path(\n            path.as_str(),\n            shell_launch_data.as_ref(),\n            current_working_directory.as_ref(),\n        );\n\n        let session = self.active_session.as_ref(ctx).session(ctx);\n\n        let patterns_clone = patterns.clone();\n        let conversation_id_clone = input.conversation_id;\n        let is_file_glob_v2 = is_file_glob_v2(&input);\n        ActionExecution::new_async(\n            async move {\n                match run_file_glob(patterns_clone, absolute_path, session, shell_launch_data)\n                    .with_timeout(FILE_GLOB_TIMEOUT)\n                    .await\n                {\n                    Ok(result) => result,\n                    Err(_) => Err(anyhow::anyhow!(\"File glob operation timed out\")),\n                }\n            },\n            move |result, ctx| match result {\n                Ok(file_glob_result) => {\n                    match file_glob_result {\n                        FileGlobV2Result::Error(ref e) => {\n                            log::warn!(\"Executing file_glob resulted in error: {e:?}\");\n                            log_file_glob_error(conversation_id_clone, ctx);\n                        }\n                        FileGlobV2Result::Success { .. } => {\n                            send_telemetry_from_app_ctx!(\n                                TelemetryEvent::FileGlobToolSucceeded,\n                                ctx\n                            );\n                        }\n                        _ => {}\n                    }\n                    // Convert FileGlobV2Result to FileGlobResult if the request was not V2.","sourceCodeStart":123,"sourceCodeEnd":159,"githubUrl":"https://github.com/warpdotdev/warp/blob/e72fd7aacbbb2236d9b3be2aad7e7178fe94b4bc/app/src/ai/blocklist/action_model/execute/file_glob.rs#L123-L159","documentation":"run_file_glob is wrapped with .with_timeout(FILE_GLOB_TIMEOUT), a 10-second budget (file_glob.rs:26,141). When the underlying glob - git ls-files inside repos, a shell glob otherwise - exceeds it, the pending operation is discarded and the action resolves to this error.","triggerScenarios":"git ls-files (or the fallback shell glob) on the workspace takes longer than 10s: very large monorepos, cold git index, network filesystems, or slow shell startup in the selected session (file_glob.rs:133-143).","commonSituations":"Agent runs file_glob at a monorepo root with millions of tracked files; repo on NFS/slow disk; heavyweight shell rc files delaying the fallback shell path; first glob after clone while the index is cold.","solutions":["Scope the glob patterns to a subdirectory instead of the repo root","Warm the git index (git status) before the agent run so ls-files is fast","If large repos are the norm locally, raise FILE_GLOB_TIMEOUT and re-measure","Trim slow shell startup (rc files, prompt hooks) when the non-git fallback path is used"],"exampleFix":"// before\nconst FILE_GLOB_TIMEOUT: Duration = Duration::from_secs(10);\n\n// after - budget sized for large monorepos\nconst FILE_GLOB_TIMEOUT: Duration = Duration::from_secs(30);","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"match run_file_glob(patterns, path, session, shell).with_timeout(FILE_GLOB_TIMEOUT).await {\n    Err(_) => {\n        let narrowed: Vec<String> = patterns.iter().map(|p| format!(\"{path}/{p}\")).collect();\n        run_file_glob(narrowed, path, session, shell).with_timeout(FILE_GLOB_TIMEOUT).await\n    }\n    r => r,\n}","preventionTips":["Prefer narrow, directory-scoped patterns over repo-root globs","Warm the git index (git status) before agent runs on large repos","Size FILE_GLOB_TIMEOUT to the largest repo your users actually run in"],"tags":["rust","warp","timeout","git","file-glob","performance"],"backgroundTag":null,"analyzedSha":"e72fd7aacbbb2236d9b3be2aad7e7178fe94b4bc","analyzedAt":"2026-08-16T08:27:25.381Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}