{"version":"2.1.274","anchor":"otel-raw-api-body-writer-now-guards-against-symlinkhardlink","canonical_anchor":"otel-raw-api-body-writer-now-guards-against-symlinkhardlink","heading":"OTEL raw API body writer now guards against symlink\/hardlink tampering","tier":"internal","area":"Telemetry","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.274\/e\/otel-raw-api-body-writer-now-guards-against-symlinkhardlink","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.274","markdown":"### OTEL raw API body writer now guards against symlink\/hardlink tampering\n\nOTEL raw API body logging now refuses to write if the target file is a symlink, has multiple hard links, or changes identity mid-write\n\n**What**\n\nWhen 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.\n\n**Why**\n\nThis 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.\n\n- Area: Telemetry\n- Names: `OTEL_LOG_RAW_API_BODIES`\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 1\/5"}