# CLAUDE_CODE_DISABLE_ATTACHMENTS

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

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** CLAUDE_CODE_DISABLE_FILE_MENTIONS

## Think of it like

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

## 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

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

## Example code

```bash
export CLAUDE_CODE_DISABLE_ATTACHMENTS=1
claude
```

Keep @ mentions as plain text.

## Why it matters

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

## Common mistake

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

## Three principles

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

## Related terms

- [Read Tool](https://learn.benibix.com/term/ai/read-tool)
- [Context Window](https://learn.benibix.com/term/ai/context-window)
- [CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS](https://learn.benibix.com/term/ai/claude-code-file-read-max-output-tokens-variable)

---

Source: https://learn.benibix.com/term/ai/claude-code-disable-attachments-variable
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-16
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
