--- title: "Measuring the long-term memory of the leading coding agents: Claude Code vs Codex vs Devin" description: "We tested the built-in memory of Devin, Claude Code and Codex on DolphinBench's 600 tests, then added past.dev. Devin with past.dev scored 93.2%." canonical: https://past.dev/blog/claude-code-vs-codex-vs-devin-memory date: 2026-11-27 last-updated: 2026-11-27 category: Research authors: The past.dev team --- # Measuring the long-term memory of the leading coding agents: Claude Code vs Codex vs Devin ![DolphinBench scores, 600 tests. Devin: 84.7% with Devin Memory, 93.2% with past.dev. Claude Code on Opus 5.5: 76.2% with its built-in memory, 89.7% with past.dev added. Codex on Sol 6.1: 66.3% with Memory v2, 85.8% with past.dev added.](/blog/coding-agents-memory/results.webp) Developers keep long conversations going with their coding agents for days or weeks, which makes memory a central driver of their ability to execute tasks. It is also a central driver of cost: every token an agent reads to remember something is a token you pay for, on every task. The past.dev team tested the memory of the 3 leading AI coding agents, Claude Code, Codex and Devin, each using its own harness and built-in memory, on DolphinBench's 600 tests. Our results show that Devin has the best built-in memory of the three: [Devin Memory](https://docs.devin.ai/product-guides/memory) scored 84.7%, ahead of Claude Code on Opus 5.5 (76.2%) and Codex on Sol 6.1 (66.3%). Adding our past.dev plugin on top of their built-in memory lifted Claude Code to 89.7% and Codex to 85.8%. Devin, with past.dev, scored 93.2%, the top score in our runs. On Claude Code and Codex, past.dev also cut the cost per passed test by 41% and 54%. Engineering is more than code. Engineers use their coding agent to plan migrations, fix bugs, write specs, answer teammates or post release notes. Much of what the agent needs to get things right is not in the codebase: it lives in Slack, meeting transcripts, emails, etc. The agent needs things that might have been said by a team weeks, months or years ago. And when your agent forgets, you have to catch the mistake and fix it, which can be frustrating and costly to the whole company. [DolphinBench](https://dolphinbench.ai/), an open benchmark from mem0, is built to measure and catch these things. Most memory benchmarks ask questions on a large corpus and grade the answers. Asking an agent about a specific rule or data point is now pretty easy with frontier models and simple search techniques. DolphinBench measures the actions agents take instead of what they find. It follows the work and personal life of three simulated people through nearly five years. Each test gives the agent a request, a set of working apps (email, Slack, Discord, calendar, a CRM), and checks what it does with it. DolphinBench's paper mostly tests memory systems inside their own reference agents but we decided to run it end to end directly through the leading coding agents instead. Every agent built its own memory from the exact same 13,539 messages, then underwent the exact same 600 tests in fresh sessions, graded by the exact same judge. Then we added the past.dev plugin, our long-term memory layer, on top of Claude Code's, Codex's and Devin's built-in memory to see how much further each could go. On Claude Code and Codex, we also tracked the tokens each run read and what each passed test cost. ## Key takeaways - **Devin Memory ranks first.** Devin’s built-in memory scored 84.7%, 8.5 points ahead of Claude Code and 18.4 ahead of Codex. - **past.dev cuts token costs.** past.dev cut input tokens per test by 41% on both Claude Code and Codex, and more than halved Codex's cost per passed test ($0.119 → $0.055). - **past.dev improves all three.** With past.dev’s plugin on top of their memory, Claude Code climbs from 76.2% to 89.7% and Codex from 66.3% to 85.8%. Devin with past.dev reaches 93.2%. - **Devin + past.dev reached 93.2%,** the highest score in our runs, with no latency cost. - On Codex, past.dev also cut input tokens by 41 to 55%. We'll report token savings for more agents in an upcoming benchmark. ## Devin vs Claude Code vs Codex: built-in memory results | Agent | Built-in memory | Model | Score on 600 tests | |---|---|---|---| | Devin | Devin Memory | Devin's medium model | 84.7% (508) | | Claude Code | Auto-memory | Opus 5.5 | 76.2% (457) | | Codex | Memory v2 (Codex 0.165) | Sol 6.1 | 66.3% (398) | Each coding agent leveraged its own built-in memory as it would with any real user. Our team replayed the exact same 13,539-message history on each agent, then tested the 600 test questions in fresh sessions. Every agent was given the exact same history, questions, and tools. Codex's recent [Memory v2 upgrade](/blog/codex-memory-v2-past-dev) showed significant gains. On Sol 6.1 it scored 16.7 points above Memory v1 (49.7%). ## Why Devin's memory wins According to [Cognition's own write-up](https://devin.ai/blog/memory-and-dreaming): Devin Memory is personal to each user and consolidated daily, a process Cognition calls “Dreaming.” Each memory links back to the session it originated from and Devin reopens that session when it needs the details. ## With past.dev, Claude Code and Codex match Devin With past.dev added on top of their own memory, Claude Code reaches 89.7% and Codex 85.8%, both above Devin Memory alone. On Claude Code and Codex, past.dev didn’t replace the built-in memory but ran on top of it as a plugin. Before each request, the plugin recalls the memories that are most relevant to the task. The agent can then call past.dev to search for more. The built-in memory keeps working and past.dev is added on top. | Agent | Own memory | Own memory + past.dev | Added by past.dev | |---|---|---|---| | Claude Code (Opus 5.5) | 76.2% | 89.7% | +13.5 points | | Codex (Sol 6.1, Memory v2) | 66.3% | 85.8% | +19.5 points | | Devin (Devin's medium model) | 84.7% | 93.2% | +8.5 points | On Codex, across both models we tested, past.dev reduced input tokens by 41 to 55% and more than halved the cost per passed test. On Claude Code with Opus 5.5, past.dev cut input tokens per test by 41% (193,811 → 114,020) and cost per passed test by 41% ($0.449 → $0.264), in the same run as its 89.7% score. ## Devin + past.dev: 93.2%, the highest score we measured Devin with past.dev scored 93.2% (559 of 600), 8.5 points above Devin’s built-in memory and the best result across every agent and memory we tested. Here, past.dev completed Devin's built-in memory. Speed is similar: a median of 62 seconds per question, against 65 seconds with the built-in memory only. ## Testing method All tests were completed with the same 600 questions in DolphinBench. Only the memory changed between runs of the same agent. The benchmark was designed by mem0 and consists of 600 questions, 200 per person (Morgan, Alex, Riley). Questions are based on a history of 13,539 messages: 339 are memory questions and 261 require document generation based on memory. Answers were graded by the official grader in [DolphinBench](/benchmarks/dolphinbench): gpt-5.6-sol with medium effort. Each agent built its own memory from the replayed history, as it would for a real user. Devin used its medium model on Devin cloud, Claude Code used Opus 5.5, and Codex 0.165 used Sol 6.1 with Memory v2. Each test is run in a new session. All agents have access to the same tools within the app. All tests were run by members of the past.dev team. This includes replaying the history, and applying the official grader. These results are not submitted to the public leaderboard in DolphinBench. We load memory and tools differently from the official leaderboard. These results should be compared to each other, and not to any results given in the public leaderboard. Token usage was not returned by the Devin API, so we can only report speed. ## How to give Claude Code and Codex long-term memory with past.dev past.dev can be used to provide long-term memory, in addition to any existing memory in an agent. Before each request, relevant memories are retrieved, and the agent can search for more. You can install the past.dev plugin in [Devin](https://github.com/pastdotdev/devin-plugin), [Claude Code](https://github.com/pastdotdev/claude-code-plugin) or [Codex](https://github.com/pastdotdev/codex-plugin), or use the past.dev API with your own agent. Our coding-specific modules will be released soon. ## FAQ ### Which AI coding agent has the best memory? With built-in memory, Devin scored the highest on DolphinBench (84.7%), ahead of Claude Code on Opus 5.5 (76.2%) and Codex on Sol 6.1 (66.3%). Adding past.dev on top of their memory took Claude Code to 89.7% and Codex to 85.8%. Using past.dev, Devin reached the highest score, 93.2%. ### What is DolphinBench? An open benchmark from mem0. The benchmark consists of 600 questions based on a conversation history of 13,539 messages, relating to 3 people. Answers were graded by an LLM. The past.dev team used this benchmark to test the memory performance of Devin, Claude Code and Codex with and without past.dev. ### How does Devin Memory work? Each user has their personal memory. Memories are consolidated once per day (Dreaming). All memories include a reference to the session they came from, and if further detail is required, the session is reopened. On DolphinBench, it scored the highest of the built-in memories we tested (84.7%). With past.dev, Devin scored 93.2%. ### Does Claude Code have memory? Yes. Notes are automatically added to a memory directory. These are then indexed in a MEMORY.md file to allow Claude Code to refer back to them in following sessions. With Opus 5.5, Claude Code scored 76.2%, and with the past.dev plugin added, Claude Code scored 89.7%. ### Does Codex have memory? Yes. Since Codex 0.165, Memory v2 keeps a history of past sessions and puts a summary of up to 10 KB in front of every task. On Sol 6.1 it scored 66.3%, up from 49.7% with Memory v1, and 85.8% with the past.dev plugin added.