vercel/turborepo · warning

Error writing run summary: {err}

Error message

Error writing run summary: {err}

What it means

After a (non-dry) run, the tracker persists the run summary to disk when should_save is set. If that save fails, turbo logs this warning with the underlying IO error and still prints the execution summary afterwards; the run's exit status is unaffected. It means the persisted run-tracking metadata under .turbo could not be written.

Source

Thrown at crates/turborepo-run-summary/src/tracker.rs:430

        // cleanup even when metrics are not being emitted.
        // Note: shutdown respects the configured timeout_ms (default 10s) to prevent
        // hanging indefinitely on network issues.
        if let Some(handle) = self.observability_handle.take() {
            // Only record metrics for actual runs, not dry runs
            if !matches!(self.run_type, RunType::DryJson | RunType::DryText) {
                handle.record(&self);
            }
            handle.shutdown();
        }

        if matches!(self.run_type, RunType::DryJson | RunType::DryText) {
            return self.close_dry_run(pkg_dep_graph, ui);
        }

        if self.should_save
            && let Err(err) = self.save().await
        {
            turborepo_log::warn(
                turborepo_log::Source::turbo(turborepo_log::Subsystem::Summary),
                format!("Error writing run summary: {err}"),
            )
            .emit()
        }

        if !is_watch && let Some(execution) = &self.execution {
            let path = self.get_path();
            let failed_tasks = self.get_failed_tasks();
            execution.print(ui, path, failed_tasks, incremental_cache);
        }

        Ok(())
    }

    #[allow(dead_code)]
    fn print_errors(errors: &[Error]) {
        if errors.is_empty() {

View on GitHub (pinned to 7fe373bc27)

Solutions

  1. Fix ownership/permissions of the repo's .turbo directory (e.g. `sudo chown -R $(id -u):$(id -g) .turbo`)
  2. Delete stale metadata and let turbo recreate it: `rm -rf .turbo`
  3. Ensure the workspace is writable and the disk has space in CI
  4. If running in Docker, execute turbo as the same UID that owns the checkout

Example fix

# before: .turbo owned by root after a docker run
sudo turbo run build

# after: run as the repo owner
turbo run build   # fix ownership first: sudo chown -R $USER .turbo
Defensive patterns

Strategy: validation

Validate before calling

# Ensure turbo can persist run summaries before running
mkdir -p .turbo && touch .turbo/.write-test && rm .turbo/.write-test \
  || { echo '.turbo is not writable'; exit 1; }
turbo run build

Prevention

When it happens

Trigger: `self.save()` fails while closing the tracker: the .turbo directory or its run metadata files are not writable (permissions, read-only mount), the disk is full, or the path is owned by a different user — common after running turbo once as root in a container.

Common situations: CI containers with read-only workspaces; Docker volumes with mismatched UIDs; a root-created .turbo later used by a non-root user; full disks in ephemeral runners.

Understand the failure class

Background: "Permission denied" / "Failed to write" file errors: why a library can't write its files to disk (EACCES, EPERM, ENOSPC) and how to fix them — this error's family across 43 libraries.

Related errors


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