Repository navigation
Replies: 2 comments
|
the core mechanic you want is a path reference that the runtime knows how to resolve at execution time, so the model context only ever sees something like full disclosure, i work on 1Claw, which is built exactly around this model: secrets live in an hsm-backed vault, agents get short-lived scoped tokens and reference paths like |
|
closing as this has been implemented as far as I can tell |
Uh oh!
There was an error while loading. Please reload this page.
The short version
I want to hand an agent a secret (an API key, a password, a token) without the agent ever seeing it.
T3 Code already has half of this. When an agent needs a secret it can call
request_secret, I get a little masked card in the chat, I paste the value in, and the agent only gets back an opaque reference. That part is great. The problem is the reference can only be used for one thing right now (signing a webhook on a scheduled task), so in every situation where I actually need it, it doesn't help:.env.So today I either paste the secret into the chat (and it lives in the transcript forever) or I hand-roll some workaround. From the other discussions it looks like a lot of people are in the same spot and have each proposed one slice of this. Nobody has gotten a maintainer answer yet, so I'm hoping this can be the thread where the overall direction gets a yes or no.
The ask in one line: let the secret card work everywhere an agent might need a secret, let me choose on the card whether it's one-time or saved for reuse, and never let the value reach the model.
Rough shape I have in mind, open to being wrong about any of it:
Everything below is detail and suggestions. The two points above are the actual request.
Details, if you want them
What exists today
request_secretand the card. A saved value becomes a one-usesecretRef, bound to the project, expiring after 24 hours. The PR says reusable named secrets were "deliberately left for later." This is a request for that later.schedule_task's webhooksignature.secretRefconsumes a ref.envprints them.secretReftopreview_typetoday succeeds silently and types nothing (noted in Let preview_type type a request_secret secretRef, so agents can sign in without seeing the password #17290).Where the value could go
None of this is meant as a spec. It's what I'd expect as a user, and how I imagine it could fit what's already there.
Shell. Something like a T3 tool that runs a command with the secret injected as an environment variable or on stdin, never in the command string. Output comes back with the value redacted. Honest caveat: since the agent writes the command, a misbehaving agent could still send the value somewhere. Redaction keeps it out of the model's context and the transcript, which is the part I care about most. It isn't a sandbox and I wouldn't claim it is.
Browser sign-in.
preview_typecould take a reference instead of literal text. It'd make sense to fill and submit in one go, tie the reference to the site it was entered for, and blockpreview_evaluateor snapshots on that tab while the password is sitting in the field. Server-hosted tabs seem like the natural first target since the browser and the secret store already share a process. #7346 has a prototype and a thorough threat model for this.Files. The card could offer to write
NAME=valueinto a file, showing me the resolved path before I save..envin the project root is the main case, but~/.config/<tool>/something.envcomes up too, so paths outside the project could just need an extra confirmation. #16540 has a prototype with screenshots.Provider and MCP config. A saved secret could be the source for a provider environment variable or an MCP header, so I enter a token once and reuse it across instances. This could plug into the same spot where sensitive variables already get swapped in. #14951 wants the same thing with Bitwarden as the source, which could sit behind the same idea later.
Lifetimes
Four options feel right, with "once" as the default so nothing changes for people who don't opt in:
The agent suggests, I confirm. I'd rather that than the agent silently deciding to persist something.
Security, plainly
The goal is that the value never lands in the model's context, the transcript, the event store, provider logs, tool results, screenshots or recordings. The existing secret store (
userdata/secrets, mode 0600) seems fine as the home for saved values, since sensitive provider variables already live there. The docs should be upfront that the agent runs as my OS user, so this is about keeping secrets out of chat and context, not about defending against a hostile agent. Scoping to a project and preferring short-lived tokens is the sensible advice.Possible order
If this got a yes, I'd guess the card and saved names come first since that's the smallest change, then whichever sink people need most (shell and browser sign-in seem to be the ones people are hitting). Each piece could be its own PR. Happy to be told a different order makes more sense.
Related
request_secretand the cardsecretRefin shell commandssecretRefinpreview_type.env, with a prototypeQuestions for maintainers
All reactions