Secrets
A secret is a credential an agent can use but never sees. The agent knows its name. When it runs a command that needs the secret, the value is placed in that one command’s environment, and anywhere the value would show up in output, the agent sees [secret NAME].
The value doesn’t enter the conversation, the search index, the logs or the model’s context.
Adding a secret
Section titled “Adding a secret”There are two ways.
In Settings → Secrets. Press Add secret, give it a name, and paste the value. The name is the environment variable commands will receive it as, so use something like STRIPE_KEY or GITHUB_TOKEN: capital letters, digits and _, not starting with a digit. A value has to be at least four characters.
When an agent asks. An agent that needs a credential shows a secret card with a password field, and says what it’s for and where to find it. Type the value and press Save, then send a message so the agent continues. Agents are told to ask for credentials this way and never in chat.
Scopes
Section titled “Scopes”Either way, you choose where it’s kept:
| Scope | Who can use it |
|---|---|
| All projects | Every thread |
| This profile | Threads in one profile |
| This project | Threads in one project |
| This thread | One thread and the threads it starts, until it’s deleted |
When the same name exists in more than one scope, the narrowest wins.
Only an agent’s card can keep a secret for a single thread. Settings offers the other three.
Where values live
Section titled “Where values live”Values go into your system’s keyring: the macOS Keychain, or the Secret Service on Linux. endurable’s own database holds only the name and description.
On a machine with no keyring, such as a headless Linux server, values go in a file in endurable’s data folder that only your user can read. Settings → Secrets tells you which is in use.
Values are write-only in the app. You can replace or remove a secret, but nothing will show it to you again.
1Password
Section titled “1Password”Instead of a value, you can give a 1Password reference:
op://Private/Stripe/api-keyendurable reads it with the op command-line tool the first time a command needs it, and stores only the reference. The value is then held in memory until endurable restarts or the secret changes, so after rotating a key in 1Password, restart endurable or save the secret again. This option appears when op is installed.
How an agent uses one
Section titled “How an agent uses one”The agent sees a list of the secret names available to its thread. To use one, it names it when running a command:
Ran `curl https://api.stripe.com/v1/charges` with STRIPE_KEYOnly that command gets the value, as $STRIPE_KEY. The transcript shows which secrets each command used.
An agent can also type a secret into a field on a web page in its browser, to sign in to something. The value isn’t recorded.
If the approval for a command is needed, the approval card says which secrets the command would get.
sequenceDiagram participant Agent participant endurable participant Keychain participant Command Agent->>endurable: run curl … with STRIPE_KEY endurable->>Keychain: read STRIPE_KEY Keychain-->>endurable: the value endurable->>Command: starts it with $STRIPE_KEY set Command-->>endurable: output endurable-->>Agent: output, with the value shown as [secret STRIPE_KEY]
A secret can list the hosts it may be sent to, such as api.stripe.com or *.github.com. The list is enforced only for sandbox threads, where the secret is swapped in as a request leaves the VM and only for those hosts. A secret with no hosts is sent nowhere from a sandbox.
A host is an exact name or *. and a domain. Ports, IP addresses and a bare * aren’t accepted.
The Hosts field usually comes filled in: from what the agent said it needs, from well-known names such as GITHUB_TOKEN, or from the websites on its 1Password item.
Commands that run on your computer, outside a sandbox, get the real value whatever the hosts say.
What masking covers
Section titled “What masking covers”Masking replaces every known secret value in tool output before the agent or the transcript sees it, including URL-encoded and JSON-escaped forms.
It doesn’t cover everything:
- Files the agent writes. If a command writes the value into a file, the file contains it.
- Images. A screenshot of a page that displays the value shows the value.
- Other encodings. Base64, for example.
- Your own messages. Don’t paste a credential into chat. Add it as a secret.
And the terminal panel shows a command’s live output unmasked. That’s your own screen, not the transcript.
Not a boundary
Section titled “Not a boundary”Like permission modes, secrets guard against accidents: a key ending up in a transcript, a log or a model provider’s servers. They don’t defend against an agent that is trying to get the value. Outside a sandbox, an agent runs as you and could read a running command’s environment.
For that level of protection, run the thread in a sandbox, where the value never enters the machine the agent’s commands run in.
Other things kept as secrets
Section titled “Other things kept as secrets”API keys for model accounts and for web search are kept the same way, in the keyring or as a 1Password reference, but agents can’t use them by name. In mcp.json, ${NAME} refers to a secret kept for all projects.