Skip to content

Build1 publisher3 min readPublished

Agent Memory Is Two Systems, Not One Dial With Scratch On One End

A dev.to series on harness engineering splits persistence into in-task scratch and cross-session recall, and argues that building them as one system produces neither.

The Engineer · Build desk

Drafted by a language model from the sources cited here and checked against its claim ledger before publication. How we use AISend a correction

Illustration accompanying Agent Memory Is Two Systems, Not One Dial With Scratch On One End
Generated illustration

What happened

  • Part 7 of the Harness Engineering series, published on dev.to, is titled 'The Memory Layer' and is part of a 10-part series described as going from raw language model to production-ready agentic system.
  • The article defines the Memory Layer as 'state that persists beyond a single model call' and states that memory in an agent is not one thing but two things.
  • When a session ends or the context window fills up mid-task, everything the agent learned, discovered or decided vanishes; when the token budget runs out, earlier turns get truncated away and the agent's earlier reasoning is gone.
  • Without a memory layer, the next time the user returns the agent greets them like a stranger.
  • Short-term memory is defined as state within a task: conversation history so far, intermediate scratchpads the agent has scribbled on, tool results from calls already made, and files read or written during the session.

Compiled by The EngineerSomething wrong?How this is made

Why it matters

Part 7 of the Harness Engineering series on dev.to defines the Memory Layer as state that persists beyond a single model call, then immediately splits it into two systems rather than one [1][2]. The split matters operationally because the failure where an agent loses its own reasoning mid-task and the failure where it greets a returning user as a stranger are different failures with different budgets [3][4].

Short-term memory, in the author's framing, is state within a task: the conversation history so far, intermediate scratchpads, results from tool calls already made, and files read or written during the session [5]. Its job is keeping the agent coherent from one iteration of the control loop to the next [6]. The diagnostic question is "what did we just try?" [7]

Long-term memory is state across tasks: facts about the user, conventions in the codebase, the agent's own past behavior, patterns learned last week that still apply this week [8]. Its diagnostic question is "what did we decide last time?" [9] The series argues the two flavors have different lifecycles, different budgets, and different designs, and that a single memory system attempting both usually does neither well [10].

The mid-task failure is the one most teams misdiagnose. When the context window fills or the token budget runs out, earlier turns get truncated away and the agent's earlier reasoning is simply gone [3]. That is not a recall problem across sessions; it is the scratchpad being evicted under pressure. A memory system designed around durable user and project facts will not save the loop when truncation starts, because the thing being lost is exactly the material a profile store was never meant to hold [5][10].

Underneath both is a point the series restates rather than discovers: the model remembers nothing, so without an explicit memory layer every interaction starts cold [11]. Anything that looks like an agent learning over time is harness work, not model work [12]. The article puts it flatly: there is no "the model remembers," there is only "the harness put the right stuff back in the context" [13]. That framing is useful because it moves the conversation from capability to plumbing. Continuity is something you build, log, and pay for in tokens.

The article names three design decisions that it says separate a real memory system from a naive one: flavor, write triggers, and bounded retrieval [14]. The excerpt available here cuts off before the elaboration, so treat those as headings rather than a specification. Readers should also note that the author sells a paid Udemy course and a live Maven workshop alongside the series, described as optional [15].

What to watch: the remaining installments are Observability, The Harness Architecture, and Decomposing Claude Code, three of ten [16][17]. The test for Part 7's argument is whether write triggers and bounded retrieval arrive as concrete mechanics, since those are where the two systems either stay separate or quietly collapse back into one store with a similarity search bolted on. Write triggers determine what earns a place in long-term memory; bounded retrieval determines how much of it comes back before it crowds out the working set [14].

Loading claim ledger
Loading source directory links
Loading share composer
Loading topic controls
Loading related stories