Log Hygiene: Structured Output From Every Agent
A fleet of agents generates a flood of logs; the question is whether the flood is data or noise. Log hygiene is the discipline that makes agent output machine-readable: structured fields, consistent schemas, bounded verbosity, and a retention policy. Logs are the fleet’s memory — and memory that cannot be queried is not memory, it is noise.
The structured contract
Every agent log entry carries a fixed schema: timestamp, agent ID, task ID, event type, status, and a payload with bounded size. The schema is a contract — the same contract discipline as tags (S10-20) and runbooks (OP-1). Structured logs are queryable: “which agents failed the economic gate this week” is a query, not a grep through prose. The structure is enforced at the source, not repaired downstream; an agent that emits unstructured logs is an agent that is not done.
What hygiene actually controls
Log hygiene controls four things: volume (bounded verbosity — debug to the debug store, decisions to the audit store), correlation (task IDs that tie an event to a run, an incident, or a customer), sensitivity (no secrets in logs — credentials stay in the vault, per S7.5 and S7.6), and retention (what is kept, for how long, and where). Each control is a policy with an enforcement point, and each feeds the observability layer that watchdogs (OP-3) and incident response (OP-5) depend on.
Logs as the audit layer
The audit layer (S7.7, S7.15) reads the log: proof-of-work for agent actions is a structured log entry with a signature. Log hygiene is what makes the audit layer possible — an audit of unstructured logs is an archaeology project, not a verification. The same logs that diagnose incidents (OP-5) and feed post-mortems (OP-10) are the evidence that customers can verify. Hygiene is not bureaucracy; it is the difference between a fleet that can explain itself and a fleet that cannot.
Grounded in the OP operations series, the S7.5/S7.6 secrets articles, the S7.7 audit article, the OP-3 watchdog article, and the OP-10 post-mortem article. Seventh article in the Round D operations track.

