warpdotdev/warp · warning

File glob operation timed out

Error message

File glob operation timed out

What it means

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.

Source

Thrown at app/src/ai/blocklist/action_model/execute/file_glob.rs:141

        let absolute_path = shell_native_absolute_path(
            path.as_str(),
            shell_launch_data.as_ref(),
            current_working_directory.as_ref(),
        );

        let session = self.active_session.as_ref(ctx).session(ctx);

        let patterns_clone = patterns.clone();
        let conversation_id_clone = input.conversation_id;
        let is_file_glob_v2 = is_file_glob_v2(&input);
        ActionExecution::new_async(
            async move {
                match run_file_glob(patterns_clone, absolute_path, session, shell_launch_data)
                    .with_timeout(FILE_GLOB_TIMEOUT)
                    .await
                {
                    Ok(result) => result,
                    Err(_) => Err(anyhow::anyhow!("File glob operation timed out")),
                }
            },
            move |result, ctx| match result {
                Ok(file_glob_result) => {
                    match file_glob_result {
                        FileGlobV2Result::Error(ref e) => {
                            log::warn!("Executing file_glob resulted in error: {e:?}");
                            log_file_glob_error(conversation_id_clone, ctx);
                        }
                        FileGlobV2Result::Success { .. } => {
                            send_telemetry_from_app_ctx!(
                                TelemetryEvent::FileGlobToolSucceeded,
                                ctx
                            );
                        }
                        _ => {}
                    }
                    // Convert FileGlobV2Result to FileGlobResult if the request was not V2.

View on GitHub (pinned to e72fd7aacb)

Solutions

  1. Scope the glob patterns to a subdirectory instead of the repo root
  2. Warm the git index (git status) before the agent run so ls-files is fast
  3. If large repos are the norm locally, raise FILE_GLOB_TIMEOUT and re-measure
  4. Trim slow shell startup (rc files, prompt hooks) when the non-git fallback path is used

Example fix

// before
const FILE_GLOB_TIMEOUT: Duration = Duration::from_secs(10);

// after - budget sized for large monorepos
const FILE_GLOB_TIMEOUT: Duration = Duration::from_secs(30);
Defensive patterns

Strategy: retry

Try / catch

match run_file_glob(patterns, path, session, shell).with_timeout(FILE_GLOB_TIMEOUT).await {
    Err(_) => {
        let narrowed: Vec<String> = patterns.iter().map(|p| format!("{path}/{p}")).collect();
        run_file_glob(narrowed, path, session, shell).with_timeout(FILE_GLOB_TIMEOUT).await
    }
    r => r,
}

Prevention

When it happens

Trigger: 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).

Common situations: 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.

Understand the failure class

Related errors


AI-assisted analysis of warpdotdev/warp@e72fd7aacb (2026-08-16). Data as JSON: /api/errors/c0628db6fae85cc8. Report an issue: GitHub.