Skip to content

agent-farm: PTY session logs have no rotation or retention policy #1238

Description

@waleedkadous

Found during a disk audit (2026-07-25): ~/.agent-farm/logs held 29,728 PTY session log files totaling 19 GB, 97% of them older than 30 days — only ~300 files had been touched in the past week. Logs accrete forever; nothing rotates, caps, or expires them.

Proposal:

  • Retention policy (e.g. delete session logs N days after their session ends; N=30 default, configurable).
  • Enforced by Tower on a periodic sweep (it already runs an orphan sweep) or at workspace start.
  • codev doctor could report total log footprint as a health line.

On the audited machine this was the 4th-largest disk consumer, ahead of most caches.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/towerArea: Tower server / agent farm CLI

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions