{"version":"2.1.300","anchor":"claude-code-attachments-by-path-env-var-forces-the-send-file","canonical_anchor":"claude-code-attachments-by-path-env-var-added-attachments-b","heading":"New CLAUDE_CODE_ATTACHMENTS_BY_PATH variable turns on by-path file sending","tier":"use","area":"Subagents","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.300\/e\/claude-code-attachments-by-path-env-var-forces-the-send-file","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.300","markdown":"### New CLAUDE_CODE_ATTACHMENTS_BY_PATH variable turns on by-path file sending\n\nSetting CLAUDE_CODE_ATTACHMENTS_BY_PATH enables the send-file tool without its usual checks, skips uploads and counts the session as remote\n\n**Unclear.** Setting the variable changes one more behaviour that has not been identified.\n\n**What**\n\n`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:\n\n- `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.\n\n- 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`.\n\n- The choice of where to upload attachments returns \"none\", so files are not uploaded.\n\n- The check for whether Claude Code runs in a remote environment returns true, alongside `CLAUDE_CODE_REMOTE_ENVIRONMENT_TYPE` and `CLAUDE_CODE_REMOTE`.\n\n- The variable is on several lists of environment variables Claude Code checks or allows at startup.\n\n**Why**\n\nWhatever 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.\n\n- Flag `tengu_lucky_whisper`: Not enough to say (read for one account on one subscription tier against v2.1.300; this account: no value returned, anonymous baseline: no value returned, compiled default: off) These values were read against a different version of Claude Code, so treat them as the nearest reading available instead of one taken on this release.\n- Flag `tengu_send_user_file`: Not enough to say (read for one account on one subscription tier against v2.1.300; this account: no value returned, anonymous baseline: no value returned, compiled default: on) These values were read against a different version of Claude Code, so treat them as the nearest reading available instead of one taken on this release.\n- Area: Subagents\n- Names: `CLAUDE_CODE_ATTACHMENTS_BY_PATH`\n- Tier: Use it now\n- Useful: 5\/5\n- Signal: 4\/5\n- Scope: individual\n- Heads-up: no"}