Free forever, no credit card.Get Started for Free →
← All posts
November 27, 2026 · 6 min read

Does Harness Remember Between Runs? Cache Intelligence Carries Your Dependencies. The Next Pipeline Starts in an Ephemeral Environment.

Does Harness Remember Between Runs? Cache Intelligence Carries Your Dependencies. The Next Pipeline Starts in an Ephemeral Environment. A Harness pipeline that runs on every commit can feel like it knows the project well. Dependencies restore in seconds, the right secrets arrive in the right stage, and the execution list shows every earlier run in order. Underneath, each execution runs in an ephemeral environment provisioned for that execution and not reused by the next one, and nothing from it

Does Harness Remember Between Runs? Cache Intelligence Carries Your Dependencies. The Next Pipeline Starts in an Ephemeral Environment.

A Harness pipeline that runs on every commit can feel like it knows the project well. Dependencies restore in seconds, the right secrets arrive in the right stage, and the execution list shows every earlier run in order. Underneath, each execution runs in an ephemeral environment provisioned for that execution and not reused by the next one, and nothing from it reaches the next pipeline unless it was saved into a cache, pushed as an artifact, or set as configuration beforehand.

That distinction matters once a pipeline does judgment work. A scheduled AI step that reviews a change or triages a failing test suite needs the reasoning from the last run, not just its downloaded packages. Harness keeps the second kind of thing well. The first kind needs a different home.

Every execution starts in an environment built for it alone

Harness CI runs each step as a container, on Harness Cloud, on a Kubernetes cluster, or on self-managed infrastructure. The stage clones the codebase, restores any cache, and runs its steps against a shared workspace. When the execution ends, that environment goes away, along with every file and installed tool that was not explicitly saved somewhere else.

Inside one stage, continuity is real: steps share the workspace, and a step can hand values to later steps as output variables, referenced with expressions such as <+execution.steps.Build.output.outputVariables.VERSION>. That reach ends at the execution boundary. The next execution gets a new environment and a fresh clone. Anything that crosses travels through a channel below.

Cache Intelligence: built for dependencies, not conclusions

Cache Intelligence is the main mechanism designed to cross executions. It is switched on at stage level with caching: enabled: true in the YAML, and it is enabled by default on newly created CI stages. Harness detects the build tooling in the stage, including Maven, Gradle, Bazel, Yarn, Go, Node.js, and .NET, and automatically saves and restores that tool's dependency cache, such as the local Maven repository. The cache key is derived automatically from files such as pom.xml or build.gradle, so a dependency change produces a matching cache instead of silently reusing a stale one. Custom keys, custom cache paths, and a pull, push, or pull-push policy can be set when the defaults do not fit.

On Harness Cloud the cache storage is handled for you. On other infrastructure, a backend such as Amazon S3, Google Cloud Storage, or Azure Blob Storage has to be configured first. Teams that want explicit control can use the Save Cache and Restore Cache steps against an S3 bucket, naming their own key and paths, also the route for sharing cached data across stages.

Every part of that design answers one question: how does the next run avoid downloading the same files again? A cache restores directories of packages, byte for byte. It does not record why a run made a decision, which warnings were judged harmless last time, or what an AI step concluded. Two related features make the same point: Build Intelligence reuses outputs of build tasks the tool marks as cacheable, and Test Intelligence uses code-change information and a call graph to select the tests a change affects. Both carry reusable work forward. Neither carries reasoning forward.

Artifacts and the workspace: outputs for people, working files for one run

What a step builds travels differently. Compiled outputs are pushed to a container registry or another artifact store, and reports and logs stay attached to the execution record, where people can open them afterwards. Those outputs persist, and a later deployment can pull the image a build produced. But the next CI execution does not start by reading the previous execution's artifacts as working state, and it never reads the previous execution's logs as part of starting. The workspace itself belongs to the one execution and is discarded with its environment.

Variables and secrets: configuration handed in, never written back

The last channel is configuration. Variables can be defined at account, organisation, project, pipeline, and stage level, and secrets are stored in Harness's own secret manager or resolved at runtime from an external one such as HashiCorp Vault, AWS Secrets Manager, or Azure Key Vault, through the Delegate. A step reads these values when it runs, and secret values are masked in logs.

Variables and secrets are configuration set in advance. A pipeline cannot write a value during a run and hand it to the next run through this channel. If a run learns something, there is no variable it can update so tomorrow's run starts knowing it. The execution history completes the picture: a record of every run, written for people to inspect, that no step reads as part of starting.

What an AI step actually needs between runs

Put an AI step inside this shape and the gap becomes concrete. Tonight's run reviews a pull request and decides three warnings are known noise, one test failure matches a flake seen last week, and a dependency bump needs a closer look because of a note from the run before. Tomorrow's run starts in a fresh environment with restored caches, the same starting variables and secrets, and none of those conclusions. It re-derives what it can, guesses at the rest, and sometimes contradicts yesterday's call.

The fix is to give pipeline-driven agents a memory that lives outside the pipeline, built to be read at the start of a run and written at the end of one. That is the role Vilix AI fills. Vilix AI is cloud-hosted, so there is zero infrastructure to run: no database to provision, no cache bucket to configure, no extra service in the pipeline YAML. An agent connects over MCP, the Model Context Protocol, and reads the same shared memory from Harness, from a local coding tool, or from any other MCP-connected agent, so every run and every tool works from one memory instead of separate silos.

Vilix AI also keeps the full conversation history, not just extracted facts or summaries. An agent can return to what was actually said and decided in an earlier run, in order, rather than working from a compressed note that dropped the reasoning. The review conclusions, the exceptions, and the context behind them are all there at the start of the next run.

Getting started is light. Vilix AI has a free plan that stays free forever, and Pro comes with a 7-day trial that needs no card. Memory can be exported or deleted at any time, so the record an agent builds stays under the team's control.

The short answer

Does Harness remember between runs? It remembers files and reusable work, within limits: Cache Intelligence carries dependency caches across executions, Build Intelligence reuses cacheable build outputs, artifacts and logs stay stored for people, and variables and secrets hand each run the same starting configuration. What it does not carry is reasoning. Each new execution starts in an ephemeral environment, blind to what the last run concluded. Give the AI steps a shared memory outside the pipeline, and the next run starts where the last one finished.

Get Started for Free

Persistent memory across ChatGPT, Claude, and the AI tools you already use in Vilix AI.

Get Started for Free

Free forever, no credit card.

Keep reading
Does GoCD Remember Between Runs? An Artifact Carries the Binary Forward. The Next Pipeline Instance Starts With Only Its Materials.

Does GoCD Remember Between Runs? An Artifact Carries the Binary Forward. The Next Pipeline Instance Starts With Only Its Materials. GoCD remembers a great deal about delivery, and almost nothing about reasoning. Every pipeline instance is recorded, every artifact a job publishes is stored, and a downstream pipeline can fetch exactly the artifact its ancestor produced. What no instance inherits is the working context behind the last run: why a stage was retried, what an operator noticed in the l

What Are the Alternatives to Google InMemory Sessions for the Anthropic SDK?

What Are the Alternatives to Google InMemory Sessions for the Anthropic SDK? The alternatives to Google InMemory sessions for the Anthropic SDK are a database-backed session store you run yourself, a managed session service from a cloud platform, or a hosted memory layer your agent connects to over MCP. InMemory sessions keep state in process memory only, so every restart, redeploy, or scale-out wipes what your agent knew. Any of the three alternatives fixes that by writing session state and co

Does Spinnaker Remember Between Runs? An Artifact Can Carry Over From the Prior Execution. The Next Execution Starts With Only Its Trigger.

Does Spinnaker Remember Between Runs? An Artifact Can Carry Over From the Prior Execution. The Next Execution Starts With Only Its Trigger. A Spinnaker pipeline that deploys the same service every day can look like it knows the service by heart. The right image arrives, the right manifest renders, and the execution list shows every earlier deployment in order. Underneath, each execution is its own record with its own context, built from its trigger and its stages. What one execution learned sta