Does Salt Remember Between Runs? Grains, Pillar, and a 24-Hour Job Cache. The Next Run Still Starts Without the Last Run's Reasoning.
Does Salt Remember Between Runs? Grains, Pillar, and a 24-Hour Job Cache. The Next Run Still Starts Without the Last Run's Reasoning. Salt remembers between runs more deliberately than most automation tools. Salt is an infrastructure automation system: a master publishes jobs to agents called minions over a persistent connection, minions execute and return results, and declarative state files describe how each machine should look. A highstate runs tonight, the scheduler fires it again tomorrow,
Does Salt Remember Between Runs? Grains, Pillar, and a 24-Hour Job Cache. The Next Run Still Starts Without the Last Run's Reasoning.
Salt remembers between runs more deliberately than most automation tools. Salt is an infrastructure automation system: a master publishes jobs to agents called minions over a persistent connection, minions execute and return results, and declarative state files describe how each machine should look. A highstate runs tonight, the scheduler fires it again tomorrow, and a reactor rule reacts to an event next week. Each time, the platform has to answer the same question: what does this run actually know from the runs before it? Salt's answer comes in four pieces, and each piece remembers a different kind of thing.
Piece one: states are memory you write by hand
The most durable thing Salt keeps is the desired state itself. State files, written as YAML SLS files and served from the master's file server, describe the end result: this package installed, this service running, this file with these contents. States are declarative and idempotent, so applying the same state twice produces the same result, and the second run reports zero changes when nothing has drifted.
That is real persistence, and it is why Salt converges fleets so well. The run does not need to remember what it did yesterday, because the state file tells it what should be true today, and the minion works out the difference against the live machine. The memory lives in the description, not in the execution. What the state file never holds is anything the run learned: which package version caused trouble last week, why one host keeps drifting, or what an operator decided during the incident. The description is rewritten by humans. The lessons stay outside it.
Piece two: grains and pillar, facts from below and data from above
Every minion also carries grains: facts it generates about itself, such as its operating system, CPU count, hostname, and network interfaces. Grains load when the minion starts and sit in its memory, and they drive targeting and let one state file behave correctly on different machines. Pillar is the mirror image: structured data generated on the master, targeted to specific minions through a pillar top file, encrypted per minion, and held in the minion's memory after it is compiled. Secrets and per-environment settings belong in pillar, and a refresh pulls a fresh compile from the master.
Together they give every run a working picture of the fleet: what each machine is, and what values it should use. There is also the mine, which collects data from minions, stores it on the master, and makes the most recent value available to every other minion, refreshed on an interval that defaults to sixty minutes. Cross-machine facts, like the current IP addresses of the web tier, stay roughly current without any run asking around.
Notice the shape of all three. Grains describe machines. Pillar carries values someone defined in advance. The mine keeps only the latest reading. None of them is a place where a run records what it concluded, in a form the next run will read on its own.
Piece three: the job cache, a memory with a 24-hour fuse
Salt does record what runs did. When a minion returns a job result, the master stores it in the job cache on its own disk, and runners such as jobs.list_jobs and jobs.lookup_jid can pull a past job back up by its ID. By default, the master keeps that information for 24 hours, set by the keep_jobs option. Returners and an external job cache can redirect results into stores like a database or Redis when a team wants a longer record.
This is a genuine history, and it is useful for audits and for answering what happened during last night's change window. But two limits define it. The first is the clock: at default settings, yesterday's returns are already aging toward deletion, and last month's are gone. The second is the audience. The job cache is written for operators looking backward. No state run, scheduled job, or reactor reaction opens the previous job's return and continues from it. The record exists; the next run never reads it.
Piece four: the scheduled or AI-assisted run starts from facts, not from the past
Put an AI step into this picture, in an orchestration that triages a failed highstate, a reactor flow that asks a model to summarize an incident, or a scheduled remediation that drafts its own plan. That step receives grains, pillar values, and whatever a template pulls from the mine. It does not receive the story: the three explanations already ruled out, the fix that was tried and rolled back, the correction an engineer made to last week's summary. It re-derives conclusions the fleet already paid for once, because everything Salt remembers is a fact, a value, or a return value, and reasoning is none of those.
The fix: one shared memory every run can read
The pattern that works is to keep Salt's stores doing what they are good at, and give the runs a memory layer built for context. Vilix AI is a cloud-hosted memory service for AI tools and agents, reached over MCP, the open protocol for connecting models to external context. There is no infrastructure to run: no database to provision, no cache to tune, no retention window to manage. A Salt orchestration, a scheduled job in another tool, and an assistant on a laptop can all read and write the same memory, because it lives outside any single platform.
What gets stored is also different in kind. Vilix AI keeps full conversation history, not just extracted facts or final values, so the next run inherits the reasoning, the rejected options, and the human corrections, not only the outcome. A run retrieves the relevant past before it acts and saves what it learned when it finishes. The free plan is free forever, the Pro plan starts with a 7-day trial and no card, and the memory can be exported or deleted at any time.
Salt's grains, pillar, mine, and job cache are the right tools for facts, values, and audit history. None of them was designed to hand a run its past reasoning. Add a memory layer that was, and tomorrow's run starts from everything the runs before it learned. Start at vilix.ai.