Agent telemetry
What to keep when the agent did it
Keeping the full prompt text for a year of a 1,000-person coding-agent fleet came out at about $20 to $79 a month in object storage in my lab, which is roughly 0.01% to 0.04% of what the tokens cost, so I don't think the storage bill is a good reason to drop it. The decision belongs to privacy, erasure and the ingest meter, and to the parts of an agent's record that no client-side log carries whatever you decide to keep.

Reading time: about 14 minutes. Evidence tier: A for the OCSF 1.9.0 schema, the MCP 2026-07-28 changelog and the ATLAS catalog; B for my own lab runs (R6, R2, R7, R8 and T8a), each on one machine with synthetic records and an agent-frozen pre-registration I have not yet reviewed; B for what a vendor page says its product does and C for its usage figures; D for the retention design near the end, labelled where it appears. Prices are AWS us-east-1 list from June 2026.
Lab run R6
The number that ends the conversation
Keeping the full prompt an agent is sent, on every request, came to about 100 GB of raw JSON per active day for 1,000 coding users, against about 0.6 GB for metadata alone (lab run R6, 2026-11-09, on synthetic OCSF records for a coding agent; Tier B), which is the kind of number that ends a retention conversation before anyone asks what it costs to store. Written to Parquet, though, the same records came to between about 196 KB per million billed tokens when sorted by session and about 785 KB in random order, so the number that scares people and the storage bill are different numbers, and most of this essay is about why they differ and about what the bill leaves out.
The frontier-refuses-forensics essay settled one question an AI incident raises, which is who runs the model while you investigate, and its answer was a platform where the model is a component you can swap under load. It left a second question open, and I think it is the one a legal team will ask first: when an agent did the thing, what did we keep that lets us say what it was told, what it saw, what it called and on whose authority? Agent telemetry may be the first log source where the most forensically useful fields are also the largest and the most privacy-exposed, because the prompt text, the tool arguments and outputs, the memory writes and the delegation chain are the record of intent, and they are also where the user's pasted secrets and personal data live. So the default lean is to log metadata, drop the text and call it a cost decision, and the shipping defaults already lean that way, since Claude Code's own telemetry redacts prompt text unless an operator sets OTEL_LOG_USER_PROMPTS and OpenTelemetry's GenAI conventions make message content opt-in (vendor and project documentation, read 2026-11-16, Tier B for what each does). R6 was a way of checking whether the cost half of that holds.
The schema
What the schema now lets you keep
OCSF 1.9.0, released on 3 August 2026, extended the ai_operation profile, which first shipped in 1.8.0 with only ai_model and message_context, so that it carries an ai_agent, an ai_model, a delegation object and a message_context object onto system, network, application and IAM events (OCSF 1.9.0 release notes and the 1.8.0 and 1.9.0 profile definitions, read 2026-11-16; Tier A). The message_context object is the one this essay is about, because it has slots for the token triple (prompt_tokens, completion_tokens, total_tokens) and for prompt_text, which the schema describes as "the verbatim instruction, query, or context" given to the model, with response_text beside it (OCSF 1.9.0 schema, message_context, read 2026-11-16; Tier A). So OCSF now has a standard place to put the words, which OpenTelemetry's GenAI conventions also carry as opt-in gen_ai.input.messages and gen_ai.output.messages attributes, and that turns "should we keep the prompt" from a logging-pipeline argument into a column you either populate or leave null; the OCSF AI-agent objects piece goes through the rest of the profile. The schema having the slot doesn't mean any producer fills it, though, and I haven't seen a shipping product emit message_context.prompt_text yet, so everything below assumes you are building the OCSF record yourself, through a gateway or a collector, even where the client can emit the text in its own format.
The bench
Four ways to keep it, priced
R6 generated the shape of a year's telemetry and left the volume to a separate step: OCSF 1.9.0 records with the ai_operation profile, one per API request, for a coding-agent tier and a chat tier, where the text is real Python standard-library source and real prose and each session's prompts grow append-only the way a real agent's context does. Then it stored them four ways (agent-run against a frozen pre-registration, and re-run byte for byte by a second agent):
- T0, metadata only: the token triple, model, agent and tool name.
- T1, hash only: T0 plus a sha256 of the prompt and of the response.
- T2, delta text: the new content each request added, which for a coding agent is mostly tool output and file excerpts.
- T3, full context: the whole prompt as sent on every request, which stretches a field the schema defines per message.
The unit that transfers across fleet sizes, for a similar workload, is bytes per million billed tokens, because it doesn't depend on how many people you have. Here is the coding tier in Parquet (pyarrow 24.0.0) at the writer's default zstd setting, median of three generator seeds, each two synthetic user-days.
| Arm | Session-sorted, bytes / M tokens | Random order, bytes / M tokens | Raw JSON, bytes / M tokens |
|---|---|---|---|
| T0 metadata only | 1,067 | 1,151 | 23,901 |
| T1 hash only | 2,563 | 2,655 | 27,640 |
| T2 delta text | 25,922 | 32,476 | 138,376 |
| T3 full context | 195,906 | 785,203 | 4,253,613 |
So full-context text runs from roughly 180 to 680 times the metadata footprint in the same row order, and in every T2 and T3 cell at the default compression level the text columns were 95% to 99.9% of the compressed bytes, which means the storage question is almost entirely a question about the text columns.
Turning that into a bill needs a volume, and the only citable one the run found was Anthropic's own Claude Code costs page, which says that across enterprise deployments the average is "around $13 per developer per active day" with 90% of users under $30, and whose /usage example works out to about 996,500 billed tokens for $0.55, about 94% of them cache reads of the same context (vendor figures, Tier C, and the vendor has an interest in how its costs read). Scaling that gives about 23.5 million billed tokens per active day for an average developer, and about 185 active days a year. That conversion assumes the page's model and cache mix holds for the average user, which it may not, and it is the largest single uncertainty in the volume, though it doesn't touch the bytes-per-token figures, which carry their own smaller caveat, that the lab counted tokens with an OpenAI tokenizer as a stand-in.
| 1,000 coding users, one year at steady state | GB held | S3 Standard per month | Per year |
|---|---|---|---|
| T0 metadata only | 5 | $0.11 | $1.40 |
| T1 hash only | 11 | $0.26 | $3.20 |
| T2 delta text | 113 to 141 | $2.59 to $3.25 | $31 to $39 |
| T3 full context, pre-registered grid | 852 to 3,414 | $19.59 to $78.51 | $235 to $942 |
| T3 full context, including the exploratory probe | 826 to 3,870 | $19 to $89 | $228 to $1,068 |
The price layer is the S3 Standard list price of $0.023 per GB-month from the same cost_model.py behind the index pays twice, read on 2026-06-10 and re-checked on 2026-06-14, so it is five months old and covers storage only. The last row's upper bound comes from a single-seed exploratory run with one-row pages, so I'd quote the pre-registered row and treat the other as the pessimistic edge. At p90 volume the full-context bill a little more than doubles, to $45 to $180 a month on the pre-registered grid.
Set that beside what the same fleet's tokens cost at list price, $13 times 185 days times 1,000 users, which is about $2.4 million a year, and the full prompt text costs somewhere between 0.01% and 0.04% of the inference that produced it. On these numbers the object-storage bill is a poor reason to drop prompt_text, and I'd push back on anyone who frames the decision that way.
Ingest and layout
Where the bytes do bite
The bytes matter in two places, and neither of them is the S3 line.
The first is anything metered on ingest. Before compression, full-context logging comes to about 100 GB of raw JSON per active day per 1,000 coding users, against about 3.3 GB for delta text and 0.6 GB for metadata. If the agent telemetry lands in a SIEM licensed by daily ingest, T3 is a sizing event on its own, and that is a cost the bench did not price because licence terms vary too much to model honestly. I'd route this data to object storage first and send a T0 or T1 projection to the SIEM for alerting, which is the same split the cost-to-serve essay argues for every high-volume source.
Ingest · where the bytes bite first
The second is that the full-context number moved by an order of magnitude on knobs few people would think of as retention policy:
- Row order. Session-sorted T3 came out 4.0 times smaller than randomly ordered T3 for coding, and 3.7 times for chat, because each prompt repeats the previous one plus a delta and the compressor can only exploit that when the previous prompt is nearby.
- The default compression level. pyarrow's default zstd level is 1, which has a small match window. Level 19 saved 86% to 88% on coding T3, though most of that saving came from the oversized pages described next, so a streaming writer shouldn't expect it.
- Page and batch framing. pyarrow checks the page size only after each write batch, so with prompts of roughly 200 KB a nominal 1 MiB page can hold a whole session and the compressor sees all of it at once. Forcing a check per row put session-sorted T3 at 303,234 bytes per million tokens at level 1, against 162,990 with the default batch, on the one seed the probe ran.
The practical reading is that a collector that flushes small files every few seconds will split sessions across files and land near the random-order row, while a nightly compaction that sorts by session and rewrites at a higher zstd level could bring the same data down several-fold, at a write-time CPU cost the bench didn't measure. So if you do keep the text, the compaction job is where the retention budget is set, which is the same place the lock-in moved to finds most of a lakehouse's query performance, and here it decides the storage bill as well.
Layout · where the retention budget is set
Two format notes, briefly, since the R6 results carry the detail. Iceberg's default write came out 3% to 6% smaller than plain Parquet only because pyiceberg passes a write batch of 20,000 rows where pyarrow defaults to 1,024, and at matched settings the two were within 0.2% on the text arms. And a per-record queue with a trained zstd dictionary at level 3 came out smaller than a Parquet column left at level 1 on chat delta text (38,234 against about 40,700 bytes per million tokens), though at a matched level 3 Parquet was smaller again at about 29,800, so an untuned lake can lose to a tuned queue on short prompts without the queue format winning.
Outside the log
What the record still won't hold
Storage cost was the easy question, and the harder one is that part of the forensic record may never reach a client-side log at all, depending on what the server chooses to send.
When the lab recorded ten real MCP tools/call exchanges against a DuckDB-backed server built on the MCP Python SDK 2.3.0, three different failures (a SQL syntax error, a rejected DROP, a missing table) all reached the wire as the same text, Error executing tool <name>, because that SDK server masks uncaught tool exceptions, so the cause never left the server process and no client-side record in any schema could carry it (lab run R2, 2026-11-09; Tier B). A later capture found where it went, and also that this is the SDK's choice and not the protocol's, since the 1.30.0 release sent the cause to the client and the 2.3.0 release sends the generic text and writes the exception and a full traceback to the server's own stderr (lab run T8a, 2026-11-10 UTC; Tier B, one fixture server on two releases of the Python SDK). The R2 run also found that none of the four schemas it mapped (OCSF main with ai_operation, the #1754 draft class, OpenTelemetry GenAI, OWASP AOS) types individual argument values, because arguments and results go into a JSON blob, an opt-in any attribute or unmapped, and OCSF main's ai_capability object keeps the tool description and schemas only as fingerprints, which tells you a tool changed but not what it said. So "keep the tool arguments" in practice means keeping a JSON column you will parse at query time, and "keep the error" means collecting the server's stderr or application log, since on this SDK release the wire doesn't carry it. The 2026-07-28 MCP revision points the same way, since SEP-2577 deprecates the protocol's Logging feature and suggests implementers "log to stderr (stdio) or use OpenTelemetry instead of Logging" (MCP specification changelog, 2026-07-28; Tier A), and the MCP logging piece works through what that does to a collection plan.
The delegation chain has its own trap, which showed up in a separate run that planted scope-escalation chains as delegation-shaped records and compared ways to find them, where a check that compared each action only against the human root's authority missed every chain in which an intermediate agent re-acquired authority it had already dropped, 31,758 such plants per run summed across the grid, while the full walk, a parent self-join and a column materialized at write time all found every one (lab run R7, 2026-11-09; Tier B, synthetic, linear chains with integer keys on a shared host, and the miss rate reflects the generator's plant mix rather than how common this is in real logs). The forensic consequence is that keeping only the root principal and the final actor, which is the cheap summary many pipelines would reach for, discards the hops where that escalation is visible, so I'd keep every hop with its effective authority, which in OCSF 1.9.0 means carrying the scope yourself, because the 1.9.0 delegation object holds only the chain identifiers (uid, parent_uid, issuer_uid, created_time) and the scope fields arrived only in 1.10.0, released 2026-11-20 (schema.ocsf.io 1.9.0, read 2026-11-16, and 1.10.0, read 2026-11-23; Tier A). If you want the cheap query, compute the escalation flag at ingest, which ran 34 to 80 times faster than the walk at 10 million records and chain depth 12 (32 to 87 times on an independent re-run), with the ingest-side cost of computing it left unmeasured. The delegation piece argues why those hops deserve the attention a logon event gets.
Memory writes are the field I'm least sure about. An agent that writes to its own persistent memory, which is how the ZombieAgent exercise made its data collection repeat in later sessions (ATLAS AML.CS0066, an Exercise rather than a recorded incident, discussed in the lethal trifecta, explained three ways), changes its future behavior in a store that usually belongs to the agent platform, and a lab comparison of the D3FEND and OCSF AI vocabularies found no object or activity for an agent's persistent memory, or for writes to it, in OCSF 1.9.0 or on main, since memory_activity is operating-system process memory, a different kind of thing (lab run R8, 2026-11-09, row D8; Tier B for the reading of pinned definitions). So today the best you can do is log the write as a tool call with JSON arguments. If the platform doesn't export memory changes, the record of how the agent was turned sits with the platform, and getting it means a request to the vendor and not a query against your own lake.
Privacy
Where erasure gets expensive
If storage dollars don't decide this, privacy and erasure do, and this section is design argument rather than measurement. A prompt log is a copy of whatever users pasted, which in a coding fleet means source code, credentials that slipped into a terminal and, in a chat fleet, personal data in the sense GDPR Article 17 cares about. Deletion vectors and GDPR makes the point that Iceberg V3 deletion vectors are necessary for erasure but not sufficient, because the deleted rows stay in the data files until compaction rewrites them and in old snapshots until expiry removes them, and every copy location needs its own answer. Agent telemetry adds copy locations that essay didn't have to consider: the gateway's own log, the model provider's retention under whatever terms you have, the agent platform's memory store, and every full-context record in which one user message reappears on each later request of the session. That last one is the expensive surprise, because in T3 a single pasted secret is stored once per subsequent request, so erasing it means rewriting every later record in the session, while in T2 it lives in one delta.
Erasure · T3 against T2
The hash arm has a privacy property worth being precise about. A sha256 of a prompt lets you prove that a prompt you hold from somewhere else is the one that was sent, which is useful when the provider or the user produces the text later, but it reads nothing on its own, and a plain hash of a short, low-entropy prompt can be confirmed by guessing, so I'd use a keyed hash and treat the key as the thing you destroy when the retention period ends.
A proposal
A tiered answer, as a proposal
What I'd suggest, labelled as my own design and untested as a whole (Tier D), is to keep T0 metadata and a keyed T1 hash for the full retention period, because they cost almost nothing (T1, which includes the metadata, held about 11 GB and cost about $3 a year for 1,000 coding users) and they answer "which agent, which model, how much, and was this the prompt"; keep T2 delta text, in session order, for a shorter window that your incident-response timeline needs; and keep T3 full context only where you can't reconstruct it. Because an append-only agent's full prompt is its system prompt plus the deltas and responses in order, T2 plus a version hash of the system prompt can rebuild T3, and the T1 hash of the full prompt lets you verify the rebuild, at about one-eighth to one twenty-fourth of T3's storage on the measured medians. That reconstruction breaks wherever the agent compacts or summarizes its own context, which Claude Code does automatically as a session approaches its context limit, and it also clears old tool results from context, according to the same costs page (Tier B for what the product does), so the T3 exception is real. The #1754 draft class has a Compact event for that moment, and if it lands, the rebuild would know where to stop; until then I'd want to measure how often the exception fires on a real fleet before anyone relies on it.
A proposal · retention by tier
The shape is a familiar one from full packet capture, where a short rolling window of payload usually sits beside flow records kept far longer, and the argument for each window is the same one here, which is how far back an investigation realistically reaches for content against how long you can justify holding it. Prompt text adds a tension packet capture mostly didn't have, though, because I'd argue that a legal team asking for the original raw logs is a reason to keep an immutable copy beside the normalized one, and with prompt text the record legal wants kept intact is the same record privacy wants gone, so the short window for T2 is a negotiated number, and I'd expect it to differ between a coding fleet and a chat fleet.
Open questions
What would change my mind
Three findings would move me. The first is a real prompt corpus that compresses much worse than real code and prose, since the lab's text is synthetic in arrangement and real prompts carry fixed tool schemas and system text that should compress better, with tool output (stack traces, JSON, logs) as the unknown; if a real fleet came in well above 890 KB per million tokens, the pessimistic edge from the single-seed exploratory probe, the cost argument would get weaker, though it would take a factor of a hundred to make storage matter against the inference bill. The second is a producer that emits the whole message array on every request, and that one already exists outside OCSF, since Claude Code's own telemetry can emit the full Messages API request body, which its documentation says includes the entire conversation history, when OTEL_LOG_RAW_API_BODIES is set (off by default; vendor documentation, read 2026-11-16, Tier B), and the one-record-per-request model doesn't price its tool schemas and message framing, so that is the measurement I'd run next. The third is a regulator or court treating stored prompts as records you must keep or produce in full, which would make T3 retention a requirement and turn the erasure section into the main cost line, and it has one near precedent I know of, the May 2025 order requiring OpenAI to preserve and segregate output logs that would otherwise be deleted in the New York Times litigation, whose ongoing duty a stipulated order ended as of 26 September 2025 (secondary legal reporting, Tier C until the docket is read). That bound a provider in one lawsuit, so I read it as a sign of where a court can go and not as a rule for an enterprise's own logs. The first, a real prompt corpus measured this way, hasn't turned up in citable form yet.
Bottom line
What I'd keep, and where the bill gets set
Bottom line: on measured bytes, keeping the prompt text for a year costs tens of dollars a month per thousand coding users, so drop it or keep it for privacy, erasure and legal reasons you can defend, keep every hop of the delegation chain, since a root-and-final-actor summary drops the hops where escalation shows, collect the server's own error output, since at least one current SDK no longer sends the cause to the client, and treat the compaction job as the place your retention bill is decided.
Sources
Sources and evidence tiers
| Claim | Source | Tier |
|---|---|---|
| Every bytes-per-token figure, the bill, the 100 GB/day ingest figure, row order, zstd level, page framing, Iceberg parity, dictionary results | SDW Lab, R6 agent-telemetry retention, RESULTS.md and VERIFICATION.md, 2026-11-09; pre-registration sha256 4b7a0bd5…, frozen 2026-11-09T22:56:38Z by the lab agent, not owner-reviewed; the real-text corpora reproduce only from the stored files, because the prose pool wasn't snapshotted | B (first-party, single host, synthetic records with real text) |
| S3 Standard $0.023/GB-month | cost-to-serve-retention cost_model.py, PRICES_PER_GB_MONTH, AWS us-east-1 list, 2026-06-10, re-verified 2026-06-14 | B (list price) |
$13 per active day average, under $30 for 90% of users, /usage example, auto-compaction and tool-result clearing | Anthropic, Claude Code costs page, code.claude.com/docs/en/costs, fetched 2026-11-09, re-read 2026-11-16 | B for what the product does; C for usage figures (vendor interest) |
Prompt text redacted by default; OTEL_LOG_RAW_API_BODIES emits full request bodies with the whole conversation history, off by default | Anthropic, Claude Code monitoring page, code.claude.com/docs/en/monitoring-usage, read 2026-11-16 | B (what the product does) |
gen_ai.input.messages and gen_ai.output.messages are Opt-In (development status) | OpenTelemetry semantic conventions v1.41.0, GenAI spans, read 2026-11-16 | A/B (project specification, development status) |
ai_operation profile contents; prompt_text and response_text definitions; 1.9.0 delegation object carries chain identifiers only | OCSF 1.9.0 release (2026-08-03); schema object message_context and the 1.8.0 and 1.9.0 ai_operation profiles, read from schema.ocsf.io on 2026-11-16 | A |
SDK error masking; no typed argument values in any schema; ai_capability fingerprints | SDW Lab, R2 one tools/call three schemas, RESULTS.md, 2026-11-09 | B |
| SDK 2.3.0 server writes the exception and traceback to stderr | SDW Lab, T8a MCP before and after, RESULTS.md, 2026-11-10 UTC | B |
Logging deprecated; "log to stderr (stdio) or use OpenTelemetry" | MCP specification changelog, 2026-07-28 (SEP-2577), re-read 2026-11-16 | A |
| Root-only check misses re-acquire escalation; walk, self-join and ingest column exact; 34 to 80 times speedup (32 to 87 on re-run) | SDW Lab, R7 delegation-chain query, RESULTS.md and VERIFICATION.md, 2026-11-09 | B (synthetic) |
| Memory write used for persistence (an Exercise, not an Incident) | MITRE ATLAS v2026.10, AML.CS0066 (ZombieAgent), sha256 ac41ee9f… | A for the catalog; C for the underlying Radware research |
| No OCSF 1.9.0 or main object for agent memory writes; #1754 Compact event | SDW Lab, R8 D3FEND vs OCSF AI vocabulary, vocabulary-table.md row D8 and VERIFICATION.md, 2026-11-09 | B (reading of pinned definitions; agent-frozen method, not owner-reviewed) |
| Who runs the model; deletion vectors necessary, not sufficient; the cost-to-serve split | Security Data Works, "When the frontier model refuses the forensics", "Deletion vectors and GDPR", "The index pays twice" | B (own prior work) |
| Provider-side preservation of output logs, ongoing duty ended as of 2025-09-26 | Engadget and Duane Morris reporting on In re OpenAI Copyright Infringement Litigation (S.D.N.Y.), May 2025 preservation order and the 9 October 2025 stipulated order | C (secondary reporting; docket not read) |
| Tiered T0/T1/T2/T3 retention design, reconstruction from deltas | This essay | D (proposal) |