Skip to main content
← Back to list
01Issue
FeatureOpenSwamp CLIPublic
AssigneesNone

Relationships

#4299 Retention or GC for auto-definitions whose runs and data are gone

Opened by zack · 11/2/2026

Follow-up from swamp-club#4280.

Auto-definitions (.swamp/auto-definitions//.yaml) are never removed. A workflow that gives each run its own behaviorName (recommended so forEach items and concurrent runs do not serialize on one model lock) adds one file per run forever. One reporter had 13,595 files under @swamp/ssh after two days.

#4280 makes lookups by id in swamp serve read only the files that declare the id. Some costs still scale with the directory size:

  • serve's DefinitionIdIndex stats every file in a type directory each time that directory changes (every run);
  • AutoDefinitionNameIndex lists the directory again on each name miss;
  • CLI scans (swamp behavior get by id, data prune, findAllGlobal-style listings) read every file.

Proposal: a retention setting or a gc phase that removes auto-definitions with no remaining data, outputs or run references, older than a configurable age. This needs a product decision. Auto-definitions can be reused by name and edited with swamp behavior edit, so deleting one throws away its global arguments, and a re-run by name would create a new id.

02Bog Flow
◉OPEN○TRIAGED○IN PROGRESS○SHIPPED

Open

11/2/2026, 4:38:07 PM

No activity in this phase yet.

03Sludge Pulse

Sign in to post a ripple.