Read → Reason → Update → Decay: The Four Phases of a Living Loop
Each phase of the Context Engine Loop has its own architectural job. This post breaks down all four — what each does, what it must avoid, and how the four compose into a system that gets smarter as it runs.
Read → Reason → Update → Decay: The Four Phases of a Living Loop
Theory · Context Engine Loop Series · May 2026
One Loop, Four Distinct Jobs
The Context Engine Loop is conceptually one feedback structure but architecturally four phases, each with a distinct job. Conflate the phases and you get a system that almost works. Separate them cleanly and you get one that compounds. This post walks through what each phase is responsible for, what it must avoid, and how to know when it is wired correctly.
Phase 1 — Read
Job
Return the connected subgraph of context most relevant to the current decision. Not a flat list. Not a single chunk. A subgraph: seeds from ANN search, neighbors from typed traversal, scored end-to-end.
What to avoid
- Over-broad retrieval. Returning 50 nodes when 8 will do dilutes the reasoning step. Set k to the smallest value that captures the right answer in evaluation.
- Untyped traversal. Walking edges of all types floods the result with semantic noise. Filter to the edge types that matter for this decision.
- Ignoring decay. Reading a stale node as if it were fresh leaks the past into the present. The composite score is non-negotiable.
Wiring check
If you swap the corpus to one from six months ago, Read should return materially different results. If it does not, Read is treating recency as flat — a bug.
Phase 2 — Reason
Job
Format the retrieved subgraph into a context block, hand it to the LLM, and capture the output. This is the only phase a standard RAG pipeline runs.
What to avoid
- Flattening the subgraph. Preserve structure in the context block — group by relationship type, keep edge labels visible. Models reason better when topology is preserved.
- Black-boxing the output. Capture not just the final answer but the agent's reasoning trace. That trace becomes input to the Update phase.
- Discarding metadata. Score, decay state, edge types — all are signal the agent can use. Pass them through, don't strip them.
Wiring check
If the agent's output is materially the same regardless of how the context is structured, Reason is collapsing the subgraph into a bag-of-chunks. The structure should change the output.
Phase 3 — Update
Job
Write the agent's output back into the store as a new node, with typed edges to the inputs that produced it. This is the phase that turns retrieval into memory.
What to avoid
- Writing back everything. Not every output is worth storing. Filter: store outputs that completed a coherent decision, not every intermediate thought.
- Missing edges. An output without edges to its inputs is an orphan node. It will not participate in graph traversal and will not strengthen the inputs it relied on.
- Wrong edge types. A casual "this referenced that" is not the same as "this responds to that." Use a small, deliberate edge type vocabulary and enforce it at write time.
Wiring check
If the store does not grow node count or edge count between iterations N and N+1 on a productive workload, the Update phase is missing. The corpus should accrete.
Phase 4 — Decay
Job
Adjust the scoring state. Increment recall counters on inputs used. Recompute importance based on downstream signal. Let time-based decay continue silently in the background.
What to avoid
- Pure time-based decay. Decay without recall reinforcement is a deletion schedule, not a memory model. The recall counter is the load-bearing piece.
- Over-eager importance bumps. Marking everything important means nothing is important. Reserve importance > 1.0 for cross-cutting material.
- Skipping silent decay. Decay must apply continuously, not only at write time. The retrieval kernel computes recency at query time using the node's age — that is silent decay, and it is non-negotiable.
Wiring check
Two queries against the same corpus, made one week apart with no intervening writes, should return different rankings. If they don't, Decay is not running.
How the Four Compose
Each phase has its own job, but the value is in the composition. Read produces a subgraph that Reason consumes. Reason produces an output that Update writes back. Update creates new state that Decay reweights. Decay sets up the next Read. The loop is a cycle, and each cycle changes the substrate for the next.
What you get from running the cycle is not better retrieval — that is a side effect. What you get is a system whose output distribution shifts in response to use. Generic outputs get less likely. Specific, business-tuned outputs get more likely. That shift is intelligence in the only operational sense that matters.
Part of the Context Engine Loop series. Next: Static Memory Is Dead Memory.