Summary
My system specifics for bug report
OS: macOS 26.6 (25G72), darwin/arm64
flyctl: v0.4.78 darwin/arm64 (commit e5cda84, 2026-08-03)
Issue
fly agent run writes stdout/stderr to ~/.fly/agent-logs/<id>.log for the agent's lifetime with no rotation, size cap, or GC.
Repro:
- concurrent
fly ssh across many isolated-network apps grew a single agent log to hundreds of GB.
- After
rm of agent-logs/*, the still-running agent kept the unlinked FD open and continued growing (~37 GB until fly agent restart).
Proposal
- On agent start: create the new log; prune old
~/.fly/agent-logs/*.log (keep last N=10, same idea as ~/.fly/logs).
- While running: bound the active file (rotate/re-open at e.g. 100–500 MB and prune). File-count retention alone is not enough, one process == one log for hours/days.
- Docs: note in
fly agent help / doctor that these files are diagnostic, bounded, and safe to delete (rm + fly agent restart).
Summary
Issue
fly agent runwrites stdout/stderr to~/.fly/agent-logs/<id>.logfor the agent's lifetime with no rotation, size cap, or GC.~/.fly/logsalready retains ~10 CLI debug runs (logging: log equiv. ofLOG_LEVEL=debugto files in~/.fly/logs#2536).agent-logshas no equivalent, so a long-lived agent under heavy WireGuard/SSH load can fill the local disk.Repro:
fly sshacross many isolated-network apps grew a single agent log to hundreds of GB.rmofagent-logs/*, the still-running agent kept the unlinked FD open and continued growing (~37 GB untilfly agent restart).Proposal
~/.fly/agent-logs/*.log(keep last N=10, same idea as~/.fly/logs).fly agenthelp / doctor that these files are diagnostic, bounded, and safe to delete (rm+fly agent restart).