Does Vault Remember Between Runs? KV v2 Keeps Old Secrets. It Still Drops the Reasoning.
Does Vault Remember Between Runs? KV v2 Keeps Old Secrets. It Still Drops the Reasoning. HashiCorp Vault remembers between runs on purpose. It is the store automations already trust with the most sensitive values in the stack: database passwords, API keys, certificates, cloud credentials. A scheduled job starts, authenticates to Vault, reads the secrets it needs, does its work, and exits. The next run reads the same paths and gets the same values, because Vault persists everything it holds in a
Does Vault Remember Between Runs? KV v2 Keeps Old Secrets. It Still Drops the Reasoning.
HashiCorp Vault remembers between runs on purpose. It is the store automations already trust with the most sensitive values in the stack: database passwords, API keys, certificates, cloud credentials. A scheduled job starts, authenticates to Vault, reads the secrets it needs, does its work, and exits. The next run reads the same paths and gets the same values, because Vault persists everything it holds in a storage backend rather than in process memory. That persistence is the point of the tool. The useful question is what shape the memory takes, because Vault keeps four kinds of state, and three of them are deliberately built to forget.
Piece one: the storage backend keeps everything, encrypted and sealed
Nothing in Vault lives only in RAM. Secrets, policies, tokens, and configuration are written to a storage backend, encrypted before they land there, and they survive restarts and machine replacement. Integrated storage and external backends such as Consul both serve this role. When a Vault server restarts, it comes back sealed: the data is all still there, but nothing can be read until the server is unsealed. From an automation's point of view, this layer is close to perfect memory. A value written in March is readable in November, bit for bit, by any run with a policy that allows it.
Piece two: KV v1 forgets every previous value
The original key/value engine, KV v1, stores one value per path. A write replaces what was there, completely and unrecoverably. There is no version number, no metadata record, and no way to ask what the path held yesterday. For static secrets that rarely change, that simplicity is a feature: smaller storage, faster requests, no history to govern. For anything resembling run-to-run memory, it is a wall. A job that writes its checkpoint into a KV v1 path has overwritten the previous checkpoint in the same motion. The store can answer "what is the value now" and nothing else. It cannot show the sequence of values, who changed them, or what the run that wrote them was thinking.
Piece three: KV v2 keeps versions, and that changes the answer
KV v2 turns each write into a new version instead of a replacement. A key retains a configurable number of versions, ten by default, and older versions stay readable: a run can request version 3 explicitly while version 7 is current. Every version carries metadata, including its creation time and a destroyed flag, and the key's metadata can hold custom fields an operator defines. Deletes are soft by default: a deleted version is marked with a deletion time, stops being returned by reads, and can be undeleted later. Only the destroy operation removes a version's data permanently. Check-and-set writes add one more safeguard, letting a writer state the version it expects to replace so two runs racing the same path cannot silently clobber each other.
This is real history, and it matters. A bad rotation becomes a rollback instead of an outage, because the previous value is still there. An operator can diff what a path held across a week of changes. KV v2 is the strongest built-in answer in the HashiCorp stack to "what did this hold before." Notice, though, what the history contains: values and timestamps. It does not contain the reasoning that produced a value, the inputs a run read, or the decision it made. The versions remember what changed. The story of why stays inside the run that made the change, and that run has exited.
Piece four: dynamic secrets and leases are built to be forgotten
Vault's most distinctive memory is the kind designed to expire. Dynamic secrets are generated on demand: a run asks for database credentials, Vault creates a real username and password in the target system, and the credential comes back attached to a lease with a time-to-live. When the lease expires or is revoked, Vault deletes the credential at the source. Tokens work the same way, issued with TTLs and renewed or allowed to lapse. This is forgetting as a security property, and it is excellent at its job. It also means anything an automation needs to carry forward cannot ride on a dynamic secret. The credential that run four used no longer exists when run five starts, by design.
The audit log remembers requests, not conclusions
Vault can write an audit log of every request it receives, with secret values hashed rather than stored in plain text. That log is a genuine record: which identity read which path, when, and whether the request succeeded. It still records access, not understanding. The log shows that a job read a configuration path at 2 a.m. It does not show what the job concluded from the value, what it decided to skip, or what it planned to do next. An operator reconstructing a night of automation from the audit log gets the footprints without the journey.
Where an AI agent step fits into this picture
Now place a scheduled AI agent next to Vault, because that is where automation stacks are heading: an n8n, Make, or cron-driven workflow whose middle step is a model that reads context, decides, and acts. Vault serves that agent well for credentials and configuration. The agent authenticates, pulls its keys, and reads any KV v2 path an operator has set aside for it. What the agent cannot pull is its own past. Which accounts it already processed, which anomalies it flagged and dismissed, which draft it produced and why it chose that wording: none of that is a secret, so none of it naturally lives in Vault, and KV paths filled by hand become a journal the agent must remember to maintain inside a store shaped for values, not narrative.
That gap is the one Vilix AI is built to close. Vilix AI is a cloud-hosted memory layer for AI agents: zero infrastructure to run, no server to seal, back up, or patch. Every tool and agent connects to the same memory over MCP, so a scheduled workflow, a coding assistant, and a chat session all read and write one shared record instead of separate stores. It keeps the full conversation history, not just extracted facts or final values, which means the reasoning behind a decision is still there when the next run goes looking for it. A run starts by reading what previous runs actually said and did, and ends by saving its own work into the same record.
The practical split is simple. Keep secrets in Vault, where versioning, leases, and sealing are the right tools for values that must be controlled and often must expire. Keep agent memory in Vilix AI, where the full history is the point. Vilix AI has a free plan that stays free forever, a 7-day Pro trial that needs no card, and export and delete controls available anytime, so the record an agent builds stays portable. Vault will keep remembering your secrets between runs, version by version. Give your agents a memory that keeps the rest of the story too.