Claude models will go to extraordinary lengths to ensure sensitive data does not end up in their context window. It's a bit nuts. But frankly I appreciate it a lot. Even when it is annoying I know the model is doing the right thing.
Yeah, I notice this as well. I was building something to help me understand logs from the different coding agents and it wrote redaction code to redact secrets out of the logs just in case if the logs had any so it wouldn't see them.
Opus 4.x really struggled with secrets rotation in sops, even in 5.5 it's constantly emitting secrets to the shell history. Thankfully everything gets tested in dev, but Claude models are the reason why we have such good secret rotation now.