Under the hoodTier: how much it should matter to you
1Useful: my rating, 1 to 5
1Signal: worth watching, 1 to 5
TelemetryArea: what it touches
Bug FixesKind: in v2.1.274,
Bug FixesSection of the release
What
When the OTEL_LOG_RAW_API_BODIES setting is on, Claude Code writes raw API request and response bodies to a file for telemetry. That writer now checks the target file's identity, its device and inode numbers, both before and after opening it, and refuses to write if the file isn't a regular file with a single hard link, has multiple hard links, is a symlink, or changed identity between the check and the write. It throws errors like "OTEL raw body target is not a regular single-link file; not writing" or "...changed identity around the open; not writing" instead of writing in those cases.
Why
This prevents the raw-body log file from being tampered with via a symlink or hardlink swap between the check and the actual write, which could otherwise let API request or response content leak to, or be manipulated at, an unintended location.
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
Confirmed sinceAnthropic's documentation has since written up OTEL_LOG_RAW_API_BODIES, on Modifying system prompts.* **Raw request logging**: set [`OTEL_LOG_RAW_API_BODIES`](/docs/en/monitoring-usage#api-request-body-event) to `file:<dir>`. Claude Code writes each request body to that directory.agent-sdk/modifying-system-promptssee the edit
How sure we are
Two sources agreeTwo things we can check say the same as this entry.
Anthropic's documentation agreesAnthropic's documentation has since written up OTEL_LOG_RAW_API_BODIES, on Modifying system prompts.
Anthropic's release notes agreeImproved OTEL_LOG_RAW_API_BODIES=file:<dir> output: a new index.jsonl and request_body_id / message.id event attributes link each response…