OTEL raw API body logging now refuses to write if the target file is a symlink, has multiple hard links, or changes identity mid-write
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.
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.
Improved OTEL_LOG_RAW_API_BODIES=file:<dir> output: a new index.jsonl and request_body_id / message.id event attributes link each response…