Skip to content
BENIBIX Learn

CLAUDE_CODE_DISABLE_ATTACHMENTS

AI⌨️ Claude CodeConfiguration

Also known as CLAUDE_CODE_DISABLE_FILE_MENTIONS

Set to 1, an @ mention is sent as text, not as the file.

Think of it like

It is like you write a book's name on a note. You do not tape the book to it.

Example

Jack's @ mentions kept pulling in huge log files and filling the chat. He sets this, and Claude reads only the parts it needs.

Why it matters

A big file pasted in whole can fill the chat fast. A plain name lets Claude read just what it needs.

Definition

CLAUDE_CODE_DISABLE_ATTACHMENTS set to 1 stops an @ mention from pasting in a file. When you type @ and a file's name, the name is sent as plain text. A close twin, with FILE_MENTIONS in the name, sends the path with a note to read it. Both are skipped in project and local settings.

Example code

bash
export CLAUDE_CODE_DISABLE_ATTACHMENTS=1
claude
Keep @ mentions as plain text.

Common mistake

Setting it in the project's settings file. It is ignored there. Set it in your shell or user settings.

Key takeaways

  1. 1
    @ stays text. No file pasted.
  2. 2
    A twin. Sends the path to read.
  3. 3
    Not in project settings. Ignored there.