Where chat text goes
| Where | What’s known | What to do |
|---|---|---|
| consumer chats (claude.ai, ChatGPT, Gemini) | history is stored at the provider; whether chats are used for training is an account setting: on by default in ChatGPT (“Improve the model for everyone”) and Gemini (Gemini Apps Activity), a toggle in claude.ai’s privacy settings | check the privacy setting in your account |
| the API | not used for training by default; requests are kept for a limited time for abuse monitoring | read the provider’s retention policy; for strict cases, a zero-retention agreement |
| the Gemini API free tier | Google uses the data to improve its products, and human reviewers may read requests | work data only through a paid key |
| an agent in the editor | reads whatever it’s allowed to: a .env in the repository ends up in the context |
deny reading secrets in the agent’s settings; keep secrets outside the repository |
| your own model (A model on your own hardware) | goes nowhere | for what must not leave at all |
How to paste a config or a log
# a config without secret values: keep the keys, mask the values
sed -E 's/((PASSWORD|SECRET|TOKEN|KEY)[A-Z_]*\s*[=:]\s*).*/\1***/I' /opt/memos/.env
# MEMOS_DB_PASSWORD=*** api_key: *** secret_token = *** MEMOS_PORT=5230 — unchanged
# KEYCLOAK_URL=*** — a false positive on KEY, erring on the safe side
# a log without addresses and emails
sed -E 's/[0-9]{1,3}(\.[0-9]{1,3}){3}/x.x.x.x/g; s/[[:alnum:]._%+-]+@[[:alnum:].-]+/user@x/g' access.log | tail -200
A model analyzing a config almost never needs a secret’s value — it’s enough to know it’s set and how long it is (Secrets off screen). It needs the structure and the errors.
If a secret already went out
Treat it as leaked: change the password or revoke the key, as when it lands in git (A secret in a commit). Deleting the message from the chat doesn’t guarantee it’s gone from the provider’s logs.