vercel/turborepo · warning

skipping automatic task caching - output generated outside o

Error message

skipping automatic task caching - output generated outside of repo root ({output})

What it means

During automatic-caching validation of outputs, TaskAccess::can_cache (crates/turborepo-lib/src/run/task_access.rs:137-151) first checks each declared output (with a leading '!' inverted-glob marker stripped) using is_windows_absolute_path. A Windows-absolute output like C:\\build\\dist cannot be anchored to the repo root, so the task is skipped from automatic caching with this warning.

Source

Thrown at crates/turborepo-lib/src/run/task_access.rs:134

                            format!(
                                "skipping automatic task caching - file accessed outside of repo \
                                 root ({unescaped_str})"
                            ),
                        )
                        .emit();
                        return false;
                    }
                }
                Err(e) => {
                    debug!("failed to parse path {unescaped_str}: {e}");
                }
            }
        }

        for output in &self.outputs {
            let output = output.strip_prefix('!').unwrap_or(output.as_str());
            if is_windows_absolute_path(output) {
                turborepo_log::warn(
                    turborepo_log::Source::turbo(turborepo_log::Subsystem::TaskAccess),
                    format!(
                        "skipping automatic task caching - output generated outside of repo root \
                         ({output})"
                    ),
                )
                .emit();
                return false;
            }

            let path = AbsoluteSystemPathBuf::new(output.to_string())
                .unwrap_or_else(|_| AbsoluteSystemPathBuf::from_unknown(repo_root, output));
            let relation = path.relation_to_path(repo_root);
            if relation == PathRelation::Parent || relation == PathRelation::Divergent {
                turborepo_log::warn(
                    turborepo_log::Source::turbo(turborepo_log::Subsystem::TaskAccess),
                    format!(
                        "skipping automatic task caching - output generated outside of repo root \

View on GitHub (pinned to f9245100cf)

Solutions

  1. Replace absolute paths with package-relative globs in the task's outputs: "dist/**" instead of C:\\repo\\package\\dist.
  2. Regenerate or hand-fix any config that injects drive letters; outputs are always resolved relative to the package root.
  3. If an output truly must live outside the package, use a symlink inside the package or move the producing step to a non-cached task.
  4. Search the repo for drive-letter patterns ([A-Z]:\\\) in turbo.json files to catch all instances.

Example fix

// turbo.json — before: Windows-absolute output
"tasks": { "build": { "outputs": ["C:\\repo\\packages\\web\\dist"] } }
// -> skipping automatic task caching - output generated outside of repo root

// after: package-relative glob
"tasks": { "build": { "outputs": ["dist/**"] } }
Defensive patterns

Strategy: validation

Validate before calling

// validate turbo.json outputs are package-relative before running
import turboJson from "./turbo.json" assert { type: "json" };
const isWindowsAbsolute = (p: string) => /^[a-zA-Z]:[\\\/]/.test(p);
for (const [task, def] of Object.entries<any>(turboJson.tasks ?? {})) {
  for (const out of def.outputs ?? []) {
    if (isWindowsAbsolute(out)) {
      throw new Error(`task "${task}" output "${out}" is Windows-absolute; use a package-relative glob`);
    }
  }
}

Type guard

const isPackageRelativeOutput = (output: string): boolean =>
  !/^[a-zA-Z]:[\\\/]/.test(output) && !output.startsWith("/") && !output.startsWith("..");

Prevention

When it happens

Trigger: A task's outputs entry is an absolute Windows path — typically produced by scripts that interpolate %SYSTEMDRIVE%-style roots, MSBuild-style output dirs, or hardcoded drive letters into turbo.json/config. The check runs per output before the repo-root relation test.

Common situations: turbo.json authored on Windows with a copied absolute path (C:\\Users\\me\\repo\\dist), CI matrices where a Windows runner config is reused from a local absolute path, and generators that emit absolute outputs instead of package-relative globs.

Related errors


AI-assisted analysis of vercel/turborepo@f9245100cf (2026-08-17). Data as JSON: /api/errors/e9fdbb3601928b49. Report an issue: GitHub.