The only thing Anthropic receives is the chat session. Files only ever get sent when they are included in the session - they are never sent to Anthropic otherwise.
Note that I am talking about this product where the Claude session is running locally (remote LLM of course, but local Claude Code). They also have a "Claude Code on the Web" thing where the Claude instance is running on their server. In principle, they could be collecting and training on that data even if it never enters a session. But this product is running on your computer, and Anthropic only sees files pulled in by tool calls.