Does Promtail Remember Between Runs? Its Positions File Resumes the Log. Nothing Resumes the Reasoning.
Does Promtail Remember Between Runs? Its Positions File Resumes the Log. Nothing Resumes the Reasoning. Promtail is the agent that ships local logs to Grafana Loki. It tails files, reads the systemd journal, discovers container logs, runs each line through pipeline stages, and pushes batches to Loki. It also restarts constantly in real deployments: config reloads, package upgrades, container recreations, host reboots. So the practical question matters. What does Promtail still know when it come
Does Promtail Remember Between Runs? Its Positions File Resumes the Log. Nothing Resumes the Reasoning.
Promtail is the agent that ships local logs to Grafana Loki. It tails files, reads the systemd journal, discovers container logs, runs each line through pipeline stages, and pushes batches to Loki. It also restarts constantly in real deployments: config reloads, package upgrades, container recreations, host reboots. So the practical question matters. What does Promtail still know when it comes back?
The documented answer is narrow and useful. One byte offset per file survives. A journal position can survive. Lines already pushed to Loki stay in Loki. Everything else about the run, including why a pipeline was changed, which lines looked suspicious, and what an operator decided last time, starts over.
The positions file: one offset per path
As Promtail reads from files and the systemd journal, it tracks the last offset it read in a positions file. The Grafana documentation gives the default location as /var/log/positions.yaml, and the positions.filename setting in the config moves it, with /var/lib/promtail/positions.yaml a common production choice. The file is a simple map: each tailed path paired with the byte offset Promtail reached.
On startup, Promtail reads that file and continues reading each log from where it left off. That single mechanism prevents the two failure modes operators fear most: re-sending an entire file after every restart, and skipping lines written while the agent was down. The documentation makes the same point for compressed files: interrupt Promtail after it has parsed and pushed 45 percent of a compressed file, and it resumes from the last scraped line and processes the remaining 55 percent.
The bookmark is only as durable as the file holding it. If positions.yaml sits in an ephemeral container layer or in /tmp and the container is removed rather than stopped, the offsets are gone, and the next start tails files from the beginning, flooding Loki with duplicates. The directory must also be writable by Promtail, and the paths must match between restarts. A renamed log file or a changed __path__ glob is, to the positions file, a new file with no history.
The journal, containers, and batches in flight
For journal sources, Promtail reads from /var/log/journal and /run/log/journal by default, and journal positions are tracked alongside file offsets. For discovered container targets there is a sharper edge: discovery will not pick up finished containers, so Promtail does not scrape the remaining logs from a container that finished while it was down. That gap is documented behavior, not a misconfiguration.
Delivery itself is batched. Promtail holds entries in memory until enough data accumulates or a configurable timeout passes, then flushes a single batch to Loki. Client settings control the shape of that handoff, with examples using a one-second batchwait and a batch size of about one megabyte. Entries still sitting in an unflushed batch when the process dies abruptly have no separate durable queue of their own. The positions offset is the recovery story, and an offset that advanced on read rather than on confirmed delivery is exactly where small gaps and duplicates are born at restart boundaries.
There is also a lifecycle fact worth stating plainly. Promtail entered long-term support on February 13, 2025, and reached end of life on March 2, 2026, with Grafana Alloy as its successor. Millions of deployments still run it, so its restart behavior still matters daily, but its memory model is now a fixed, finished design: offsets and cursors, nothing more.
Where the offset model stops
A byte offset answers one question perfectly: where to resume reading. It answers nothing else. It does not record that yesterday the pipeline dropped debug lines on purpose, that a label was renamed to control stream cardinality, or that a spike in error lines was traced to a bad deploy and already explained. A scheduled automation that reads Loki output, summarizes incidents, or decides whether to page someone wakes up in the same position. The logs are all there. The reasoning that connected them is not, unless someone re-briefs the agent from scratch on every run.
That re-briefing is the hidden tax on recurring AI automations. The agent re-reads dashboards, re-derives which alerts were already handled, and occasionally re-decides a question that was settled last week, differently. The fix is not a better offset. It is a shared memory layer that the agent reads before it acts and writes back to when it finishes, so the next run starts from the last run's conclusions instead of from raw logs alone.
Giving the next run the reasoning, not just the log
Vilix AI is built for exactly that layer. It is cloud-hosted with zero infrastructure to run, so there is no positions file, database, or server for an operator to babysit. The same memory is available everywhere over MCP, which means an n8n workflow, a Make scenario, a script, and a coding assistant can all read and write one shared state instead of each keeping a private notebook.
Vilix AI also keeps full conversation history, not just extracted facts. That distinction matters for automation operators: the decision, the evidence behind it, and the wording of the instruction that produced it all stay retrievable, so a run can check why a threshold was chosen rather than guessing. The free plan is free forever, and the Pro trial runs seven days with no card required, so testing it against one real recurring workflow costs nothing. Memory can be exported or deleted at any time, keeping the operator in control of the record.
Promtail remembers where it stopped reading, and that is genuinely valuable. Pair that discipline with a memory that remembers what your automations concluded, and a restart stops being a reset. The log resumes from the offset. The work resumes from the reasoning.