What probably matters to youSection of the release
What
CLAUDE_CODE_ATTACHMENTS_BY_PATH is a new environment variable, a setting handed to Claude Code when it starts. It was not in v2.1.299. When it is set:
preserveToolUseResultInSubagents on the send-user-file tool is forced on, so the tool's results are kept inside subagents (helper copies of Claude given part of a task). Before, only the remote switch tengu_lucky_whisper decided this. That switch is still read when the variable is not set, with a fallback of false.
The send-file tool's isEnabled() check skips the first-party provider check and the allow_send_file check, and the tool's availability check returns true, as it already did for CLAUDE_CODE_REMOTE.
The choice of where to upload attachments returns "none", so files are not uploaded.
The check for whether Claude Code runs in a remote environment returns true, alongside CLAUDE_CODE_REMOTE_ENVIRONMENT_TYPE and CLAUDE_CODE_REMOTE.
The variable is on several lists of environment variables Claude Code checks or allows at startup.
Why
Whatever sets this variable, typically a program hosting Claude Code, gets the send-file tool without the usual provider and permission checks, no attachment uploads, and remote-session behaviour. If you set it yourself, expect all of these together.