Claude Code✓ Confirmed in official docsAdded Oct 14
How to make Claude Code pass @ file mentions as paths, not contents
In Claude Code, an @file mention in your prompt normally pastes that file's contents into the conversation. Set CLAUDE_CODE_DISABLE_FILE_MENTIONS to 1, added in 2.1.299, and @ mentions are no longer expanded. Claude gets the paths with a note to read them using its file tools, such as Read. Use it when mentioning a big file or directory shouldn't dump everything into context at once.
export CLAUDE_CODE_DISABLE_FILE_MENTIONS=1
claude
It's ignored in the env of project settings (.claude/settings.json) and local settings. Export it in your shell or put it in the env of your user settings (~/.claude/settings.json). Requires v2.1.299 or later.
Sources
Get notified when a new tip lands
Tip alerts only go out in the app. Install it and turn notifications on.