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

Does Grafana Loki Remember Between Runs? Its WAL Replays the Lines. Nothing Replays the Reasoning.

Does Grafana Loki Remember Between Runs? Its WAL Replays the Lines. Nothing Replays the Reasoning. Grafana Loki collects log lines from servers, containers, and applications into one searchable store. It restarts for upgrades, scaling, config changes, and node failures, so the memory question is practical. When Loki comes back, what does it still hold, and what was never stored in the first place? The documented answer splits cleanly in two. Loki remembers log data very well: lines survive cra

Does Grafana Loki Remember Between Runs? Its WAL Replays the Lines. Nothing Replays the Reasoning.

Grafana Loki collects log lines from servers, containers, and applications into one searchable store. It restarts for upgrades, scaling, config changes, and node failures, so the memory question is practical. When Loki comes back, what does it still hold, and what was never stored in the first place?

The documented answer splits cleanly in two. Loki remembers log data very well: lines survive crashes through a write-ahead log, flushed data lives as compressed chunks in object storage, and an index keeps those chunks findable for as long as retention allows. What Loki does not hold is any conclusion drawn from those lines. An AI agent that read yesterday's errors, grouped them, and decided which ones mattered starts its next scheduled run with the raw lines available and none of its own reasoning saved.

First, the crash window: the ingester WAL

New log lines land on an ingester, the component that receives pushes, groups lines into streams, and builds chunks in memory. Memory is fast and fragile, so Loki protects acknowledged writes with a write-ahead log, or WAL, on the ingester's local filesystem.

Every incoming entry is recorded in the WAL before it counts as accepted. If the process crashes before its in-memory chunks flush to long-term storage, the restart replays the WAL first: Loki reads the log back, rebuilds the in-memory state, and only then registers the ingester as ready for new writes. A backpressure mechanism keeps replay bounded, flushing to storage when replayed data passes the configured memory ceiling, so a very large WAL can still be recovered on a smaller machine.

The WAL is deliberately narrow. It holds recent log entries, not query results, not dashboards, and not notes. Once chunks flush, the long-term record takes over, and that record has a specific shape worth understanding.

Long-term memory: chunks plus a label index

Loki's defining design choice is what it refuses to index. The content of a log line is not indexed at all. Lines are grouped into streams, where a stream is one exact set of labels, such as a cluster, a namespace, and an application name. Only those labels go into the index.

Ingesters compress each stream's lines into chunks and flush them to object storage such as Amazon S3, Google Cloud Storage, Azure Blob, or the local filesystem for small setups. Chunks are immutable once written. Alongside them sits the index, in the current recommended setup a TSDB index stored in the same object storage, organized in 24-hour periods under schema v13. The index maps label sets and time ranges to chunk references. It is a table of contents, not a summary.

A query works the split in reverse. The querier asks the index which chunks match the label selector, fetches those chunks, and runs the LogQL filters and text scans at query time. Recent lines still held by ingesters are included too. The system is honest about the trade it makes: storage stays cheap because the index stays small, and every question is answered by re-reading raw lines rather than consulting anything pre-digested.

How long the memory lasts: the compactor

Retention in Loki belongs to one component, the compactor, which runs as a single instance. By default, retention is not enabled at all, and logs sent to Loki live forever. Turning it on takes deliberate configuration: retention_enabled: true in the compactor block, a retention_period in the limits configuration, and a delete request store.

The compactor then works on two independent schedules, compaction and retention, with compaction running every 10 minutes by default. It merges a day's index files into one per tenant, walks that index to find chunks past the retention period for that tenant or stream, removes their references, and writes the doomed chunk references into marker files. The chunks themselves are deleted later, asynchronously, by a sweeper after the configured deletion delay, which gives index gateways time to refresh their copies. Both operations are idempotent, and if the compactor restarts, it continues from where it left off.

So Loki's memory has a clear lifecycle: WAL for minutes, chunks for as long as retention allows, deletion by schedule. Every stage preserves lines exactly as they arrived. No stage preserves what anyone made of them.

The gap a scheduled agent actually hits

Consider a routine automation: every hour, an agent queries Loki for errors from a checkout service, groups duplicates, checks whether each group matches a known pattern, and posts a short incident digest. Loki supports the reading part perfectly. The LogQL query returns the same lines tomorrow that it returned today.

The grouping, the pattern matches, the decision that three of the nine error groups were the same deploy and two were noise: none of that lives in Loki, the WAL, or the compactor. Unless the automation writes its conclusions somewhere built for them, the next run re-derives everything from raw lines, re-reads the same history, and can easily reach a different grouping with no record that it changed. The log store remembers the evidence. The investigation starts over.

That is the layer Vilix AI is built to provide. Vilix AI is a cloud-hosted memory layer for AI agents, reached over MCP, with zero infrastructure to run: no database to provision, no vector store to maintain, no service to keep alive between runs. The same memory is available everywhere the work happens, so an n8n workflow, a Make scenario, and a script on a laptop all read and write one shared state instead of separate local notes.

What gets saved is also different in kind. Vilix AI keeps full conversation history, not just extracted facts, so an agent recovering its context gets the reasoning, the corrections, and the decisions in order, not a flattened summary. A triage agent can open its next run by reading what it concluded last run and why, then query Loki only for what is genuinely new.

The practical terms are simple. There is a free plan that stays free forever, and a 7-day Pro trial that needs no credit card. Memory can be exported or deleted at any time, so the record an automation builds stays under its operator's control.

Two stores, two jobs

Loki should keep doing its job: cheap, durable, label-indexed storage of every log line, with a WAL that survives crashes and a compactor that enforces how long lines live. Expecting it to remember an investigation is asking a log store to be an agent memory, and it was never designed as one.

Give the lines to Loki and the conclusions to a memory built for them. The next run then starts where the last one ended, with the evidence one query away and the reasoning already saved.

Start with Vilix AI and let each scheduled run build on the last.

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 syslog-ng Remember Between Runs? Its Persist File Resumes the File. Nothing Resumes the Reasoning.

Does syslog-ng Remember Between Runs? Its Persist File Resumes the File. Nothing Resumes the Reasoning. syslog-ng collects, filters, and forwards log messages for servers and networks, and it restarts constantly: package upgrades, config reloads, host reboots, container rescheduling. So the memory question is concrete. When syslog-ng comes back, what does it still hold, and what was never stored anywhere? The documented answer splits in two. syslog-ng remembers delivery state very well. A pers

Does Kafka Connect Remember Between Runs? The Offsets Topic Resumes the Stream. Nothing Resumes the Reasoning.

Does Kafka Connect Remember Between Runs? The Offsets Topic Resumes the Stream. Nothing Resumes the Reasoning. Kafka Connect moves data between Apache Kafka and the systems around it: databases, search indexes, object stores, message queues. Its workers restart for upgrades, config changes, rebalances, and plain failures, often several times a week in a busy deployment. So the practical question is worth asking precisely. When a Connect worker comes back, what does it still know? The documente

Does Softr Remember Between Runs?

Does Softr Remember Between Runs? No. A Softr workflow or scheduled agent remembers nothing from one run to the next on its own. Inside a single run, workflow variables carry data from step to step, and an app agent remembers details about a user during that conversation. Between runs, the only things that survive are what you wrote into a database record, and the run log Softr keeps for you to read. What does a Softr workflow remember inside one run? Quite a lot, while the run is alive. Var