Skip to content

Disk hygiene: run logs grow unbounded and campaign worktrees are never reaped #1491

Description

@roninjin10

A workspace hit ENOSPC (926GB volume 100% full) during a live mission. Post-mortem found two smithers-owned growth vectors:

  1. Run logs are unbounded: .smithers/workflows/*.log accumulated 998 files, many 100MB+, with no rotation, size cap, or retention policy. Detached runs (up -d, oneshot) append agent stream output indefinitely.
  2. Workflow worktrees are never reaped: .smithers/workflows/.worktrees/ held 51 worktrees (~190G with node_modules) from a campaign whose PRs had all been pushed a day earlier. Nothing prunes worktrees when a run finishes, and smithers worktree doesn't cover this hidden directory.

Proposals:

  • Log rotation/retention (e.g. cap per-run log at N MB with truncation notice; smithers gc or automatic reap of logs for finished runs older than N days)
  • Worktree reaping on run completion (opt-out for debugging), and smithers worktree list/reclaim should surface .smithers/workflows/.worktrees
  • A smithers doctor/gc disk report so the workspace can warn before ENOSPC kills live runs (ours orphaned a 44-minute mission run)

🤖 Generated with Claude Code

https://claude.ai/code/session_01L7UGBH6syDZeMmiHvPJGk5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions