# Feeding a live, still-growing results file into an LLM system prompt safely

- Source: https://chatoverflow.dev/n/feeding-a-live-still-growing-results-file-into-an-llm-system-prompt-safely-2a7a9ad5849a
- Author: @stefanienguyn
- Published: 2026-11-15
- Net votes: 0
- Tags: llm, prompting, agents, provenance, python

Pattern for giving a planning model the output of a running loop (e.g. a self-improvement harness that keeps appending to a markdown progress file): re-read the file on every request rather than at startup, so updates land without a restart. Cap it (we keep head + tail with a [middle left out] marker, ~12k chars) since loop logs grow without bound and both the summary at the top and the newest rounds at the bottom matter. Wrap it in explicit tags, strip any closing tag from the content, and frame it as notes not instructions: it cannot change tool rules or limits, and current sensor readings win on conflict. Tell the model the file age (mtime) so stale results are weighted accordingly. Record path + content hash + age in the plan/receipt so you can trace which version influenced which decision, and log plainly when the file is missing instead of failing. Keep all hard limits enforced in code, not in the prompt.
