Skip to content

Name failed run starts and stop worktrees on a full volume - #11

Merged
cursor[bot] merged 1 commit into
masterfrom
dougrathbone/run-failure-attribution-f45c
Sep 21, 2026
Merged

cursor[bot] merged 1 commit into
masterfrom
dougrathbone/run-failure-attribution-f45c

Conversation

@dougrathbone

Copy link
Copy Markdown
Owner

Investigation

Looked at this failed run plus the recent cluster of Failed rows on that agent. I could not open the production run log (Okta), and Conduit does not ship those logs to Datadog. Production Sentry (project conduit) and Slack alerts fill in the gap:

  • 31 Aug: data volume 97% full (2516 MB free) — dataDirSweeper disk-pressure alert
  • 31 Aug: ENOSPC: no space left on device, write in appendLines(runDeliveryLog)
  • 1 Sep: Not enough disk space to sync this repository… from repoSync

That matches Linear PFM-7547 (large-monorepo checkouts exhausting the pod) and the overnight “runs just stop” pattern discussed around OOM (nodes later raised 8 GB → 32 GB).

On the code path, a failed factory.startRun (classic git worktree add ENOSPC) marked the row failed without lastLine. Cron then retried into more blank Failed runs while each attempt tried to check out another multi-GB worktree. A SIGKILL of the CLI (null / 137) likewise left the history row stuck on the last Bash line, so OOM looked like a mysterious mid-command failure.

A separate Sep 17 thread (Colin): agents failing because global MCPs were injected without access. That is not this PR.

Fix

  • Persist Failed to start run: … on the run row (and in the log) when worker prep throws, so history is not blank.
  • Refuse to materialize a worktree/clone when the backing volume is already at the 90% critical threshold; throw the same operator-facing disk-full message.
  • When the agent CLI is SIGKILL’d (or exits 137), write an explicit system line about OOM / disk-pressure eviction. Cooperative SIGTERM (stopRun) is unchanged.
  • Recognize Not enough disk space… in isDiskFullError so Sentry tags those starts as diskFull.

Ops follow-up (not in this PR)

Confirm the production data volume actually grew after PFM-7547, and whether that agent’s overnight cron is still firing into a full (or nearly full) disk. Memory-pressure telemetry already exists; a still-tight cgroup will keep SIGKILL’ing heavy nx/tsc runs even with a named lastLine.

Tests

  • diskPressure classify / assertVolumeHasSpace
  • cliKillDiagnostic / failedStartLastLine
  • isDiskFullError for the operator-facing disk-full copy
  • Existing disk-pressure and gitOps suites still pass
Open in Web Open in Cursor 

Prep failures (worktree ENOSPC, clone errors) left a Failed run with a blank
lastLine, so cron retries piled up unlabeled. Persist the start error on the
run, describe SIGKILL of the CLI in the log, and skip materializing a workspace
when the backing volume is already at the critical fill threshold.

Co-authored-by: Doug Rathbone <dougrathbone@users.noreply.github.com>
@cursor
cursor Bot merged commit 9134663 into master Sep 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants