You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[feature request] Let preview tools type secrets by reference (secretRef) so passwords never enter the agent transcript
#18909
The preview browser tools can't sign in to anything that needs a password without exposing the password. preview_type only accepts a literal text, so the agent has to put the password into the tool call. That puts it in the model's context, the saved transcript, any provider logs, and anything that replays the thread.
T3 already has a safe way to hold a secret: request_secret returns a secretRef. But only some tools accept a secretRef (for example, a webhook task's signature.secretRef), and none of the preview tools do. So the agent has the secret safely stored and still can't type it into a browser field.
Today the workaround is to leave T3's preview browser for a CLI browser such as agent-browser. A shell pipe can feed it the value (op read … | jq … | agent-browser batch), so the value never appears in a tool call. This means giving up the preview pane the user can watch, and it goes against our own instruction to use the preview tools for browser work.
Real case
An agent checking a deployed app end to end had to:
sign in as two test users (email, password, then a 6-digit authenticator code);
disable a user from an admin session;
confirm the other session lost access.
The passwords were in 1Password and the macOS keychain, and the authenticator codes came from keys in the keychain. None of this could go through the preview tools without the secrets landing in the transcript, so the agent switched to agent-browser.
Proposal
preview_type accepts secretRef as an alternative to text. Exactly one of the two is required. T3 resolves the reference on its side and types the value into the field. Nothing about the value comes back to the model: no value, length or echo in the result.
Secrets created from a command's output. Besides request_secret (the user types the value), let an agent create a secretRef from a shell command that T3 runs on its side, for example op read op://vault/item/password, security find-generic-password -s svc -a acct -w, aws secretsmanager get-secret-value …, vault kv get -field=password …, or printenv NAME. That one source covers password managers, the macOS keychain, cloud secret stores, HashiCorp Vault and environment variables, with no per-tool connector. The model only receives the reference.
The user approves the command once per thread, or it matches an allowlist in settings.
The reference names the origins it may be typed into, and the preview tools refuse any other origin.
T3 removes one trailing newline, caps the size, applies a timeout, and treats a nonzero exit or an empty result as an error. stderr never reaches the model.
T3 would read the value; the agent would only get a secretRef.
The thread decides how long a reference lasts. Today a secretRef works once. A sign-in test might type the same password three or four times (initial sign-in, a step-up check, signing in again after a disable), so allow a reference to last for the thread or for N uses. Keep single use as the default.
Optional: authenticator codes from a stored key. For example, preview_type({ secretRef, transform: "totp" }) would generate the current 6-digit code (RFC 6238) from a stored base32 key. This is common for test accounts with two-step sign-in, and it means the long-lived key never reaches the model either.
Redact secret values in what the tools send back. Typing the value is not enough if it comes back to the model another way. Mask any value typed from a secretRef:
in preview_snapshot and the accessibility tree (fields that aren't password fields, such as code inputs, show their value there);
in preview_evaluate return values, console output and network logs;
in recordings (preview_recording_*).
A plain string match on known secret values, applied to tool output before it goes to the model, covers most of this.
Acceptance criteria
An agent can sign in through the preview browser using a password from 1Password or the keychain, and the value appears nowhere in the thread JSONL, the tool arguments or the tool results.
Using a reference after it expires or runs out of uses returns a clear error and types nothing.
The UI shows that a field was filled from a secret (for example "•••• (from secret align-dev-password)") so the user can follow along.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Problem
The preview browser tools can't sign in to anything that needs a password without exposing the password.
preview_typeonly accepts a literaltext, so the agent has to put the password into the tool call. That puts it in the model's context, the saved transcript, any provider logs, and anything that replays the thread.T3 already has a safe way to hold a secret:
request_secretreturns asecretRef. But only some tools accept asecretRef(for example, a webhook task'ssignature.secretRef), and none of the preview tools do. So the agent has the secret safely stored and still can't type it into a browser field.Today the workaround is to leave T3's preview browser for a CLI browser such as agent-browser. A shell pipe can feed it the value (
op read … | jq … | agent-browser batch), so the value never appears in a tool call. This means giving up the preview pane the user can watch, and it goes against our own instruction to use the preview tools for browser work.Real case
An agent checking a deployed app end to end had to:
The passwords were in 1Password and the macOS keychain, and the authenticator codes came from keys in the keychain. None of this could go through the preview tools without the secrets landing in the transcript, so the agent switched to agent-browser.
Proposal
preview_typeacceptssecretRefas an alternative totext. Exactly one of the two is required. T3 resolves the reference on its side and types the value into the field. Nothing about the value comes back to the model: no value, length or echo in the result.request_secret(the user types the value), let an agent create asecretReffrom a shell command that T3 runs on its side, for exampleop read op://vault/item/password,security find-generic-password -s svc -a acct -w,aws secretsmanager get-secret-value …,vault kv get -field=password …, orprintenv NAME. That one source covers password managers, the macOS keychain, cloud secret stores, HashiCorp Vault and environment variables, with no per-tool connector. The model only receives the reference.The user approves the command once per thread, or it matches an allowlist in settings.
The reference names the origins it may be typed into, and the preview tools refuse any other origin.
T3 removes one trailing newline, caps the size, applies a timeout, and treats a nonzero exit or an empty result as an error. stderr never reaches the model.
T3 would read the value; the agent would only get a
secretRef.The thread decides how long a reference lasts. Today a
secretRefworks once. A sign-in test might type the same password three or four times (initial sign-in, a step-up check, signing in again after a disable), so allow a reference to last for the thread or for N uses. Keep single use as the default.Optional: authenticator codes from a stored key. For example,
preview_type({ secretRef, transform: "totp" })would generate the current 6-digit code (RFC 6238) from a stored base32 key. This is common for test accounts with two-step sign-in, and it means the long-lived key never reaches the model either.Redact secret values in what the tools send back. Typing the value is not enough if it comes back to the model another way. Mask any value typed from a
secretRef:preview_snapshotand the accessibility tree (fields that aren't password fields, such as code inputs, show their value there);preview_evaluatereturn values, console output and network logs;preview_recording_*).A plain string match on known secret values, applied to tool output before it goes to the model, covers most of this.
Acceptance criteria
Related Ideas
All reactions