Does Azure Pipelines Remember Between Runs? A Cache Carries Your Dependencies. The Next Run Starts on a Fresh Machine.
Does Azure Pipelines Remember Between Runs? A Cache Carries Your Dependencies. The Next Run Starts on a Fresh Machine. A pipeline that runs every night can look like it remembers. The cache restores in seconds, the variables are already filled in, and the run history shows every previous execution in order. It feels continuous. Underneath, Azure Pipelines starts each run from the definition and the inputs it is given, on a machine that, for Microsoft-hosted agents, has never run anything before
Does Azure Pipelines Remember Between Runs? A Cache Carries Your Dependencies. The Next Run Starts on a Fresh Machine.
A pipeline that runs every night can look like it remembers. The cache restores in seconds, the variables are already filled in, and the run history shows every previous execution in order. It feels continuous. Underneath, Azure Pipelines starts each run from the definition and the inputs it is given, on a machine that, for Microsoft-hosted agents, has never run anything before. What carries between runs is only what was deliberately placed in one of a few specific stores, and each of those stores was built for files or configuration, not for reasoning.
That gap matters when a pipeline does judgment work: a scheduled AI step that triages failures or updates a tracker needs yesterday's conclusions, not just yesterday's dependencies.
The Microsoft-hosted agent forgets everything, by design
Microsoft documents the hosted pool plainly: all agents in the Microsoft pool are fresh, new virtual machines that have never run any pipelines, and when the job completes, the agent VM is discarded. Everything on that machine goes with it: the checkout, installed tools, generated files, and anything a step left running.
Self-hosted agents are different, and the difference is a trap. Microsoft notes they are typically reused, so a job can leave side effects such as warmed caches or a mostly current local repo. That leftover state is accidental, not promised, and a pipeline that relies on it breaks when the pool changes.
Even inside one job, continuity is narrow. Each step runs in its own process, so environment variables are not preserved between steps. Scripts pass values forward with logging commands: ##vso[task.setvariable variable=myVar] makes a variable available to later tasks in the same job, and it still ends with the job.
Output variables pass strings inside one run, and stop there
Output variables are the channel for moving a value further. Set a variable with isOutput=true and a later task in the same job can read it as $(TaskName.myVar). A downstream job that depends on the first can read it through dependencies.<job>.outputs, and a downstream stage can read it through stageDependencies, provided the dependency is declared with dependsOn.
Those rules define the limit. Output variables are strings, they travel only along the dependency graph of a single run, and they exist to wire that run together: a version number here, an image tag there, a computed path somewhere else. There is no output variable store to query tomorrow. A value the nightly pipeline calculates on Monday is gone on Tuesday unless a step wrote it somewhere durable on purpose.
Pipeline artifacts outlive the run, as files for people
Artifacts are the store designed to persist. A job publishes files with the publish step or PublishPipelineArtifact, and a later job or stage downloads them with DownloadPipelineArtifact. After the run, the artifacts stay attached to the run record, where people can download them and inspect what the pipeline produced.
How long they stay is a project decision. Retention is set at project level in Project settings, under Pipelines and Settings: how many days to keep artifacts, symbols, and attachments, how many days to keep runs, and how many recent runs per pipeline. When a run is deleted, its logs, artifacts, symbols, binaries, test results, and metadata go with it.
So an artifact can hold a summary an AI step wrote, but nothing decides what belongs in it, reads it back as working context, or protects it from the retention clock. Artifacts move files. They do not maintain a memory.
The cache is the one automatic carry-over, and it expires in a week
Pipeline caching is what makes a pipeline feel like it remembers. The Cache@2 task takes a path and a key, commonly built from the operating system and a hash of a lockfile, with restoreKeys as fallbacks for a near match. On a hit, the saved directory is restored and the job skips the download or rebuild. On a miss, the job simply continues and recreates what it needed.
Microsoft's rules keep the cache in its lane. Caches are immutable: once created under a key, content cannot be modified, so changing content means changing the key. Caches are scoped per pipeline and branch, so one pipeline cannot use another's cache as shared state. And caches expire after seven days of no activity, so a paused pipeline can return to find its cache gone.
For dependencies, all of that is correct behaviour. A miss costs minutes. For knowledge, it fails on every rule: immutable, branch-scoped, and deleted after a quiet week is the opposite of what run-to-run reasoning needs.
Variables and run history are configuration and record, not memory
The remaining pieces are easy to mistake for memory. Pipeline variables and variable groups arrive with every run, but people author them in YAML or the UI. A run reads them; it does not write its conclusions back into them, so they describe how the pipeline should behave, never what it learned.
Run history works the same way in reverse. Azure DevOps keeps a faithful record for people to review, but no mechanism hands the previous run's log to the next run as context. A pipeline cannot notice it reached the same conclusion three nights in a row.
What a scheduled AI pipeline actually needs between runs
Put the pieces together and the pattern is clear. Azure Pipelines offers a fresh machine per job, strings inside one run, files under a retention policy, and a disposable cache with a seven-day clock. Each piece does its own job well. None of them holds the full story of what happened across runs: what the agent checked, what it decided, what it already tried, and what a human corrected.
That story is what a recurring AI step needs at the start of every run, regardless of platform or model. That is the job of a memory layer outside the pipeline.
Vilix AI is built for exactly that job. It is cloud-hosted, so there is zero infrastructure to run or maintain: no database to provision, no store to back up, no retention policy to tune. A scheduled pipeline connects over MCP, reads the shared memory before it plans, and writes back what happened, so the next run starts with the last run's reasoning instead of a blank workspace.
Because the memory lives outside any one tool, the same memory is available everywhere the work happens: in the pipeline's AI step, in a different automation platform, and in the AI tools used to inspect or fix the pipeline. Vilix AI keeps full conversation history, not just extracted facts, so a later run can see why a decision was made, not only that it was made. The free plan is free forever, and the Pro plan offers a 7-day trial with no card required. Memory can be exported or deleted at any time, so the record stays under the operator's control.
Give the pipeline a memory that survives the discarded VM, and tonight's run finally knows what last night's run learned.