This comparison uses HashiCorp’s Vault docs as of December 2026.
What Vault is built for
Vault describes itself as “centralized, well-audited privileged access and secret management” for infrastructure. Platform teams use it for dynamic database credentials, policies on secret paths, PKI and encryption as a service. Apps get secrets through the API or Vault Agent (Vault’s own client daemon, not a coding agent).
It’s also infrastructure you run. A self-managed cluster starts sealed and has to be unsealed, needs quorum storage for high availability, and per the docs can’t be recovered, even from backups, if the seal keys are lost. Vault’s own docs say it “can also be overwhelming if you have limited or simple secret management needs”.
Where Vault stops: the handover
Vault’s job ends when the secret is read. For a coding agent, that’s where the risk starts:
- If Vault Agent injects
STRIPE_API_KEYinto Claude Code’s environment, the agent holds the real key. It can print it, log it, commit it or send it anywhere it can reach. - A Vault policy can scope which secret the agent gets. It can’t say “this key may look up customers but not issue refunds”, because Vault never sees the request to Stripe.
- Short-lived credentials help, but an hour is a long time for an agent tricked by a prompt injection.
Vault’s AI features don’t close this gap: its MCP server is in beta, and the docs warn it “may expose certain Vault data, including Vault secrets, to MCP clients and LLMs”.
What Stashbase does instead
Stashbase is built for the moment Vault leaves out: the agent using the credential. You write an agent profile once, and every run is held to it:
stashbase agent run --profile local -- claude
Placeholders and rules per request
The agent holds a placeholder. The Agent Proxy adds the real credential only when a request matches a rule on host, method, path and values in the JSON body:
[[secrets.STRIPE_API_KEY.rules]]
effect = "allow"
hosts = ["api.stripe.com"]
methods = ["GET"]
paths = ["/v1/customers/*"]
GET /v1/customers/cus_123 gets the real key. POST /v1/refunds is blocked. MCP tools get the same treatment: the agent sees only the tools you allow, and a tool can be allowed only with specific arguments, like creating Linear issues in one team with only a title and description.
Catch leaks before they ship
Vault protects the secrets it stores. It can’t tell you when one ends up in your code. stashbase scan blocks commits and pushes that contain a secret, using AI-based detection, and can match findings against the secrets you keep in Stashbase. Add allow_hooks = ["secret_scan"] to an agent profile and every commit the agent makes is scanned too.
Run agents anywhere, with nothing to operate
The same profile works on your laptop, your own server or a VM for agents with Claude Code and Codex preinstalled. With the remote proxy, real keys are added on Stashbase servers and never reach the machine the agent runs on. There’s no cluster to run: you install a CLI.
Secrets for your apps and infrastructure too
Stashbase isn’t only for agents. It’s a secrets manager for your apps and infrastructure as well:
- Projects and environments as flexible groups of secrets, with roles and teams deciding who can read or change each one.
- Apps and CI get secrets through
stashbase run -- npm run dev, service accounts and environment accounts, or the Node.js SDK. - Syncs to AWS Secrets Manager, GCP Secret Manager, GitHub Actions and Vercel, plus webhooks when a secret changes.
- Version history for every secret, and an access log that names who used it: a member, an app or an agent.
Already running Vault? Keep it for what only Vault does, like dynamic database credentials and PKI. Stashbase can hold the rest of your app and infrastructure secrets, and gives your agents profiles instead of Vault-issued credentials. More background: why coding agents need access control.