{"slug": "what-does-an-ai-agent-actually-remember", "title": "What Does an AI Agent Actually Remember?", "summary": "A developer argues that AI agent memory is really just text the software saves and resends to the model, and that the most important layer is run state — which steps of a job already finished — rather than the context window or conversation history. Citing Diagrid's documentation on the Claude Agent SDK, the developer notes that the SDK \"persists conversation state but not execution position\" and \"doesn't know whether an issued tool call actually completed,\" so a resumed run can repeat a tool call. The developer recommends asking any agent framework how it knows, after a restart, which tool calls already finished.", "body_md": "Less than most people assume. The model inside an agent remembers nothing from one call to the next. Everything the agent \"remembers\" is text its software saved and sends back to the model each time.\n\nAI agent memory comes in three layers.\n\nThe context window. The text the model can see on this one call. When it fills up, older text gets dropped or summarized.\n\nThe conversation history. Saved messages and tool results, sent back to the model so it can follow along.\n\nThe run state. Which steps of the job already finished, and what each one returned.\n\nMost talk about agent memory is about the first two. I think the third matters most once an agent does real work, because it's what tells the agent, after a restart, that it already sent the invoice.\n\nThe fair objection is that frameworks already save the conversation. Diagrid's page on the Claude Agent SDK draws the line well. The SDK's sessions write every message, tool call and tool result to disk, but the SDK \"persists conversation state but not execution position.\" It \"doesn't know whether an issued tool call actually completed,\" so a resumed run can call the same tool again.\n\n[https://www.diagrid.io/learn/claude-agent-sdk-durable-execution](https://www.diagrid.io/learn/claude-agent-sdk-durable-execution)\n\nPut one question to your framework's docs: after a restart, how does the agent know which tool calls already finished?", "url": "https://wpnews.pro/news/what-does-an-ai-agent-actually-remember", "canonical_source": "https://dev.to/tonygraham/what-does-an-ai-agent-actually-remember-de6", "published_at": "2026-12-03 19:08:55+00:00", "updated_at": "2026-12-03 19:16:27.599379+00:00", "lang": "en", "topics": ["ai-agents", "large-language-models", "ai-tools"], "entities": ["Diagrid", "Claude Agent SDK", "Anthropic"], "also_reported_by": [], "takeaway": "Conversation history alone doesn't prevent duplicate tool calls after a restart — the Claude Agent SDK persists messages but not execution position, so agents need explicit run-state tracking of which tool calls completed.", "recommendation": {"advice": "Persist run state — which steps finished and what each returned — separately from conversation history, and check it on resume so a restarted agent doesn't re-issue completed tool calls.", "playbook": "agent-architecture", "playbook_url": "https://wpnews.pro/playbooks/agent-architecture"}, "alternates": {"html": "https://wpnews.pro/news/what-does-an-ai-agent-actually-remember", "markdown": "https://wpnews.pro/news/what-does-an-ai-agent-actually-remember.md", "text": "https://wpnews.pro/news/what-does-an-ai-agent-actually-remember.txt", "jsonld": "https://wpnews.pro/news/what-does-an-ai-agent-actually-remember.jsonld"}}