Skip to content

Host limits: wait for free disk space instead of starting sessions that fail on a full disk #2091

Closed

Description

@JacobStephens2

This was generated by AI during triage.

What happened

On 2026-11-12 the thirdshift.app host's root filesystem filled (154 GB, 0 bytes free at about 04:59 EST). Every session start after that failed within seconds: git worktree add failed with "unable to write file … No space left on device", and Session trace writes failed with os error 28. Within about five minutes, four Commands failed on that host: a Fix run, two Architect-dispatched Spec runs (sotto-android #14, sayit #1) and Pickup #2020, which failed three times. The host limits showed nothing wrong, because they check only memory and load.

Agent Brief

Category: enhancement
Summary: Host limits also wait for free disk space, so a full disk delays sessions instead of failing them.

Current behavior:
Host limits admit a session only when available memory is at or above the configured minimum and one-minute load per CPU is at or below the configured maximum. When either is out of range, the session waits and logs "waiting for host resources: ". Disk space is not measured, so a host with a full disk admits sessions that then fail.

Desired behavior:

  • Host limits gain a minimum available disk space setting, alongside the memory minimum and with the same semantics: 0 disables it, and equality is allowed.
  • The measurement is the free space available to the user on the filesystem that holds the Launch directory's worktrees. If the system temporary directory is on a different filesystem, it is measured too, and the lower value counts.
  • When free space is below the minimum, admission waits exactly as it does for memory and load, with a reason such as "available disk 412 MB is below 5120 MB".
  • The default is a sensible nonzero value, so a full disk is caught without configuration. Pick one that leaves room for a typical session's build output (several GB), and document it.
  • The host limits Snapshot shown by the CLI and the Console Resources page includes available disk and its minimum.

Key interfaces:

  • The host limits type (today: memory minimum and load maximum) gains a disk minimum read from User config under the same section as the existing host-limit settings.
  • The host measurements type gains available disk space.
  • The Snapshot display lists available disk next to available memory.

Acceptance criteria:

  • With the disk minimum above the measured free space, admission reports not ready, and the reason names disk, both values and units.
  • With the minimum at 0, disk never blocks admission.
  • Equality admits, matching the memory check.
  • Memory, load and disk are assessed independently, and all failing reasons are listed together.
  • The setting round-trips through thirdshift config and appears in the generated User config documentation.
  • The Resources page and the CLI Snapshot show available disk and the minimum.

Out of scope:

  • Cleaning up disk space (separate issues).
  • Changing how a session that runs out of space mid-run is classified (filed separately).
  • Per-repository disk limits.

Activity

  1. added
    enhancement
    ready-for-agent
    in-progress
    and removed
    ready-for-agent
    on Nov 12, 2026
  2. added a commit that references this issue on Nov 12, 2026
  3. removed
    in-progress
    on Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions