What Never Reaches the Model: Secrets and Personal Data
An engineer is debugging a failed payment job at the end of a long day. They copy the job's config into the chat to ask what's wrong. The config has a live database connection string in it, password included.
Nobody meant to share it. That's how it always happens. And a tool reading production output will print a token sooner or later, because that's what production output contains.
So Frontier Investigation Agents check both directions. A secret you paste gets caught when you press send, before the message goes anywhere. A secret or personal identifier a tool prints gets swapped for a placeholder before the model, the chat or stored output sees it. The model works with a stand-in, and commands get the real value by name at run time. Both checks are part of CloudThinker's security model, and both have limits, listed at the end.
Why the usual approach breaks
The common answer is a policy: "don't paste secrets into AI tools." Policies don't survive a 2 a.m. incident. People paste what's in front of them.
The other common answer is a filter after the fact. Scan the logs, find the key, rotate it. By then the value is in a transcript, and maybe in a model provider's request. Rotation is the cleanup, not the protection.
We wanted the check to happen before the value goes anywhere, and the default to be that the model works with a stand-in, never the real thing.
The path a value takes
01On send
Scan the paste
Credential-shaped values stop the message until you decide.
02Tool output
Swap for placeholders
Secrets and protected identifiers are replaced before anyone sees them.
03The model
Stand-ins only
It reasons over placeholders and key names, never the value.
04Commands
Real value by name
A command that uses $KEY gets the secret when it runs.
Each step covers a different leak. The paste scan covers what people type. Placeholders cover what tools print. The $KEY reference lets a command use a secret without anyone, model included, reading it.
On send: the paste scan
When you send a message, CloudThinker scans it for credential-shaped values: API keys, tokens, passwords, connection strings. A long paste that becomes an attachment is scanned the same way. If something matches, a Review detected secrets dialog opens, and the message waits until you decide.
01Save secrets
Store and reference
Admins only. The value becomes a credential and the message uses $KEY.
02Redact
Remove and send
The value is replaced with [sensitive data removed].
03Not a secret
Keep as written
For a false positive. The text sends unchanged, real secret or not.
Save secrets stores each value as a workspace credential and puts its key name in your message where the value was. Saving needs the workspace Admin role. Everyone else can redact, or mark a false positive. A message like this:
Check why this key gets 401s from the billing API: sk-live-...
sends as this:
Check why this key gets 401s from the billing API: $BILLING_API_KEY
A command that uses $BILLING_API_KEY gets the real value when it runs. The model and the chat only see the name. The connection string from the opening goes the same way: the engineer still gets an answer about the config, and the password never lands in the transcript.
In tool output: placeholders
When an agent's tool returns a secret or a protected identifier, CloudThinker replaces it before the model, the chat or stored output gets it. Secrets are caught two ways: an exact match against the secrets CloudThinker holds for the run (connection secrets and saved credentials), and pattern rules for known key formats. So an AWS secret key in a config file an agent prints is hidden even if you never saved it, as long as the API keys and cloud credentials rules stay on.
The placeholders look like this:
ct:secret:v3:openai-api-key:2d9c4e7a0b16
ct:pii:v3:email:4c1f0a9e27b3 [op***@ma***.com]
Each one reads ct, then secret or pii, the format version, a category, and an ID. Three properties make them useful for investigation.
Same value, same placeholder, within a conversation. The agent can tell that two references point at one secret, and reason "the key in this error is the key in that config" without ever holding the key. In another conversation, the same value gets a different placeholder.
No way back. A placeholder can't be turned back into the value, by you or by an agent. There's no reveal button. The ID is a keyed HMAC-SHA256 value that mixes in the conversation, so it can't be brute-forced back to a short password without CloudThinker's key.
Hints stay readable. An identifier placeholder can carry a partial hint in brackets, like the masked email above, so output still makes sense to a person.
No way back has a cost: an agent can't search by a masked value, so it can't look up a user by an email it only sees as a placeholder. That's why some identifiers start unmasked. Agents investigating network or IAM problems usually need to read IP addresses and account IDs.
All of this happens before any model call, so it holds whichever model runs the turn, including your own key through BYOK.
Your own identifiers: Guardrails
Built-in rules cover common formats. In Admin Settings → Guardrails, you choose which ones run and add patterns for your own.
| Identifier | Default | Kind |
|---|---|---|
| Email, phone, credit card, IBAN, MAC address | On | Personal data |
| API keys, cloud credentials | On | Secrets |
| IP addresses, public keys, cloud account IDs | Off | Personal data |
A custom pattern describes the format, never a real value. \bACC-\d{6}\b matches ACC- followed by exactly six digits, and the \b boundaries stop it matching inside a longer ID. Give it a category such as customer-id, and agents see ct:pii:v3:customer-id: followed by an ID. CloudThinker checks a pattern when you save it and refuses one it can't read, one that can match empty text, or one too complex to run on every message.
Each rule runs Off, at Workspace scope or at Organization scope. An organization Admin can lock a built-in rule so no workspace can turn it off. Lock the API keys and cloud credentials rows: they're on by default, but a workspace Admin can switch them off unless they're locked.
When something gets through
The paste scan looks for known credential formats, and an unusual one can slip past. If that happens, treat it as exposed:
- Rotate the secret at its provider. Assume the model saw it.
- Ask a workspace Admin to delete the conversation, so the raw value isn't kept in its history.
- Save the new value as a credential and reference it as
$KEYfrom then on.
To mask that format in tool output next time, add a custom pattern. It doesn't extend the paste scan. For a secret format the scan should know, tell CloudThinker support.
The design decisions
Check before send, not after. A secret caught in the dialog was never stored. A secret caught in a log scan already was.
Storing is always explicit. Nothing becomes a workspace credential without someone choosing Save secrets.
Consistent stand-ins. An agent that can't tell two secrets apart can't debug a credential mismatch. Same value, same placeholder, inside one conversation.
No reveal button. If a placeholder could be reversed, the reversal would become the thing to steal.
Honest limits
- Exact matching depends on the name. A saved value is matched exactly when its key sounds like a secret (containing
KEY,TOKEN,SECRETorPASSWORD) and it's 6 or more characters. A value saved asREGION, or a short one, is caught only if it matches a known format, so a command likeenvcould print it. - "Mark as not a secret" means what it says. A real key marked that way sends as typed.
- Changes aren't retroactive. Turning a rule on doesn't mask output that's already stored.
- The scan runs on send, not while you type. Unsent drafts stay in your browser for up to 24 hours and are cleared when you log out. On a shared computer, log out instead of closing the tab.
- Placeholders cover secrets and protected identifiers, not everything. Anything else a connection's credential can read can reach the model, because command output is part of the conversation. Scope each credential to what agents need.
- Custom patterns have a budget. Five per workspace, counting organization patterns, and there's no match preview. A broad pattern, such as any UUID, hides values agents need. Make each one specific.
- Share links are public. An artifact you share can be opened by anyone with the URL, and values that start unmasked, like account IDs, will be on it. Read it as an outsider would before you share.
Getting started
Paste a config that holds a dummy key in a real format, and watch the dialog open before anything sends:
"Here's the config for the failing job. Tell me why the connection keeps timing out."
Then reference a saved credential by name:
"Use $STRIPE_API_KEY to list this week's failed payments and tell me which key you used, by name."
For the rest of the trust layer, see the security page.



