Cognition's Devin Now Remembers Your Codebase and Learns While You Sleep

Cognition gives Devin cross-session memory stored as a Git repo of markdown files, plus a nightly dreaming pass that consolidates and prunes what it learned.

·
·
·
Read4 min
TypeNews
  • Cognition shipped Memory and Dreaming for Devin, storing cross-session lessons as a Git repo of markdown files
  • Dreaming is a daily background pass that consolidates overlapping notes, prunes stale ones, and surfaces new patterns
  • Each session gets its own Git checkout; revision checks reject stale writes so parallel sessions can safely share one drive
  • Early experiments showed swarms of Devins using the shared memory as an unprompted coordination message board
  • Agent Memory Repo is an open spec with MEMORY.md entry points, one-line entries, and [[wiki-style]] cross-links
  • Available now in Devin under Customize to Memory, with a GitHub repo for Claude Code, Cursor, and other agents

Cognition has added two persistent-context features to Devin. Memory records reusable lessons from coding sessions, while Dreaming revises those records in a daily background run. The company also released Agent Memory Repo, an open specification for storing agent memory as Markdown files in Git.

Coding agents often spend time rediscovering a project’s package manager, naming conventions, deployment quirks, and environment failures. Devin can now retain those lessons as it works. Each memory is a short note linked to the session where Devin learned it, giving later sessions useful context without requiring users to maintain a separate skill file.

A memory store you can diff

Cognition stores each user’s notes in a personal Memory Drive, a persistent Git repository. Files can be organized by repository, project, or topic. A compact MEMORY.md file contains general preferences and an index of the other notes.

Every new session receives MEMORY.md as initial context. Devin can then search and read relevant files with the same tools it uses to navigate source code. Selective retrieval keeps the full archive out of the model context, limiting prompt growth as memories accumulate.

Each concurrent session receives its own checkout of the Memory Drive. After changing a note, Devin commits the edit, merges updates from other sessions, and writes the result to persistent storage. A revision check rejects stale writes when another session updates the drive during synchronization, allowing Devin to retry from the latest version.

Dreaming cleans the archive

Once a day, Dreaming reviews past conversations alongside the current memory repository. During each background session, Devin:

  • Consolidates overlapping notes.
  • Removes transient details.
  • Captures useful lessons missed during the original session.
  • Deletes stale records that subsequent sessions have not used.

The process preserves source references and explicit user preferences while reorganizing notes and updating their index. Its role resembles scheduled garbage collection combined with retrospective extraction from session history.

Git becomes a coordination layer

When several Devin sessions shared one Memory Drive in Cognition’s early tests, they began using files to exchange findings. The repository became a coordination surface for parallel agents, even though that behavior had not been prescribed.

The Agent Memory Repo documentation illustrates the pattern with four performance-debugging agents assigned to the database, runtime, cache, and load balancer. They record observations in shared findings.md and questions.md files. Combining their partial evidence exposes cross-system problems that each agent’s local view can miss.

Each session commits independently. Git merges compatible edits, while a conflict requires the session with the stale version to read the latest changes before writing again. That provides an audit trail and basic concurrency control through familiar repository operations.

A small, portable specification

Agent Memory Repo defines a limited set of conventions:

  • MEMORY.md is the entry point loaded by every session; it stays short and indexes other files.
  • Each memory is a one-line bullet with optional metadata such as [source: ...; added: YYYY-MM-DD].
  • Cross-references use wiki-style [[path]] links.
  • Sessions involving multiple users can clone each person’s repository onto the same machine and route writes to the appropriate owner.

Cognition created the format for Devin and released it as an open standard. A plugin supports Devin CLI, and the documentation includes setup instructions for Claude Code, Cursor, and other agents. The specification and project discussions are available in the GitHub repository.

What developers gain

Plain Markdown gives developers direct control over stored context. They can inspect, search, edit, and diff memories, including changes made by Dreaming. Git adds version history and makes a Memory Drive portable enough to push, fork, or share through existing workflows.

Multi-agent builders also gain a simple coordination model: shared files hold discoveries, per-session checkouts isolate work, commits preserve provenance, and merge conflicts expose competing updates. Those primitives can replace a custom shared-state service for workflows that fit Git’s file-based model.

Memory repositories may contain project details, user preferences, and links to source sessions. Teams should review repository contents and access controls before sharing or cloning them beyond their intended scope.

Memory and Dreaming are available to existing Devin users at no additional cost under Customize > Memory. Developers can adopt the open specification independently in their own agents.

Trending
  • No trending articles

Comments

avatar

Next Reads