Summary
The hooks-logging module is a pure append-only writer — the only file operation is log_path.open("a", ...). There is no size cap, rotation, or TTL option, so events.jsonl grows without bound for the life of a session, and session directories accumulate forever.
Measured impact (one real machine, heavy but ordinary interactive use)
- 23.8 GB of events.jsonl across 2,892 session files
- Individual files up to 1.1 GB per session
- 13.8 GB written in a single 2-day window
(Measured with the app-cli raw: true default active — see #332, which makes full llm:request payloads ~97% of the bytes. But even with raw: false, append-forever with no retention option remains unbounded.)
Why this belongs in the module (mechanism, not policy)
Retention policy is arguably app-layer, and amplifier session cleanup --days N exists. But an opt-in size cap or rotation option on the writer is mechanism, not policy — consistent with kernel philosophy. Today the only mitigation is manual whole-session deletion; there is no way to bound the cost of a single long-running session.
Ask
Optional module config on hooks-logging, e.g.:
hooks:
- module: hooks-logging
config:
max_bytes: 104857600 # opt-in cap or rotation per session log
Related: #332 (default raw: true injection is what makes the growth rate extreme).
Summary
The
hooks-loggingmodule is a pure append-only writer — the only file operation islog_path.open("a", ...). There is no size cap, rotation, or TTL option, soevents.jsonlgrows without bound for the life of a session, and session directories accumulate forever.Measured impact (one real machine, heavy but ordinary interactive use)
(Measured with the app-cli
raw: truedefault active — see #332, which makes fullllm:requestpayloads ~97% of the bytes. But even withraw: false, append-forever with no retention option remains unbounded.)Why this belongs in the module (mechanism, not policy)
Retention policy is arguably app-layer, and
amplifier session cleanup --days Nexists. But an opt-in size cap or rotation option on the writer is mechanism, not policy — consistent with kernel philosophy. Today the only mitigation is manual whole-session deletion; there is no way to bound the cost of a single long-running session.Ask
Optional module config on hooks-logging, e.g.:
Related: #332 (default
raw: trueinjection is what makes the growth rate extreme).