Guide8 min read

Nikos Dritsakos, Founder

Memory for AI coding agents: how Glen fits your workflow

Compare Glen, AGENTS.md and built-in memory for AI coding agents. See what Glen records, who can read it, and when repo files are the better choice.

On this page
  1. How a decision reaches another developer's agent
  2. Glen, repo files and built-in memory compared
  3. Best for
  4. Not ideal for
  5. Details
  6. FAQ
  7. Try Glen

Three kinds of tool help a coding agent remember project decisions across sessions: instruction files in the repo, the agent's built-in memory, and a dedicated memory service. Glen is the third kind. It records coding-agent sessions from you and your teammates into one memory for your organization, and your agent can search that memory when a task touches past work.

Glen has plugins for Claude Code, Codex, Cursor, Pi and Grok Build. Other MCP clients can search the same memory.

Use Glen when the reasoning behind your code lives in agent sessions and someone else, or another agent, will need it later. If you work alone with one agent, try your repo files and that agent's built-in memory first.

How a decision reaches another developer's agent

Say a developer using Claude Code decides, with their agent, that billing webhooks go through a queue instead of being handled in the request. Weeks later, a second developer asks Codex to add a webhook handler. Nobody wrote the decision into AGENTS.md. The scenario is made up; the steps are what Glen does.

  1. The first session is recorded. Plugin hooks send each turn to your organization in Glen, and a commit made in the session is linked to it.
  2. The conversation becomes memory. A background pipeline turns it into stored memory. Glen doesn't publish how long that takes, so don't assume it's instant.
  3. The second agent searches. Glen's search skill has the agent run something like glen search "why billing webhooks go through a queue, and who decided". The agent chooses whether to search, and you can ask it to.
  4. Glen answers with sources. The result is a written answer with a citation for every claim. A language model writes it, so it can be inaccurate or out of date. Check the sources before relying on it.
  5. The decision changes. If the team reverses it later, Glen aims to follow the decision that stuck. An old decision can still come back, and glen forget stops it being recalled.

Glen, repo files and built-in memory compared

Repo files (AGENTS.md, CLAUDE.md, rules)Built-in agent memoryGlen
Best forRules every session must followOne developer's preferences and correctionsWhy decisions were made, and what teammates and other agents worked out
Who writes itPeople, by handThe agent, from your sessionsHooks record sessions; a pipeline stores memory
How the agent gets itLoaded at session startVaries by agent (below)The agent runs glen search
Who can read itAnyone with the repoOne machine, in Claude CodeYour organization (Privacy Policy, section 4)
Main limitHolds only what someone wrote and kept currentDoesn't reach teammatesHosted only; recall depends on the agent searching

Built-in memory varies, and these limits were current in November 2026:

Glen does not replace repo instructions. A rule the agent must apply every time belongs in AGENTS.md, because it doesn't depend on the agent deciding to search. OpenAI gives the same advice for Codex: keep required team guidance in AGENTS.md or checked-in documentation. Glen holds the reasoning from sessions nobody wrote up. When a decision found there hardens into a rule, put the rule in AGENTS.md.

Best for

  • Several developers running agents in the same codebase
  • Developers who move between agents and want one history
  • Codebases where the answer to "why is this here?" sits in old agent sessions
  • New hires whose agents should start with what the team already decided

Not ideal for

Details

Setup and supported agents

You need Node.js and a Glen account. The setup command is:

npx @tryglen/cli@latest install
What the hooks do
  • Claude Code and Codex: Claude Code's and Codex's hook files run glen session-start at session start, glen ingest on prompt submit and on stop, and glen pr-link after Bash commands.
  • Cursor: the docs list each hook. Recall is on demand because Cursor's hooks can't add context to every turn.
  • Pi: the docs list each event. Each one fails open, so pi keeps working if Glen is unreachable.

To start from a line of code, glen code-search follows git blame to the conversations that wrote those lines.

What gets recorded
Permissions and privacy terms
User controls
Benchmark conditions

Glen published this replay itself, and its sections on setup and grading give these conditions:

  • One workspace with two months of Glen history, with Slack and GitHub connected
  • The repository's last 100 merged PRs, reverted and re-implemented by Codex 5.5 from one-shot prompts
  • Memory rolled back to just before the session that produced each PR
  • Five runs per PR in each arm, reported as the mean
  • Wall clock measured end to end, including hook round trips

Reported results: 29% fewer tokens, 21% faster, and quality at parity or better. The post says recalled context landed before the agent's first turn, so a session where the agent decides when to search may differ.

FAQ

Does Glen replace AGENTS.md or CLAUDE.md?

No. Keep rules in repo files. Glen holds the session history and reasoning those files leave out.

Is memory added to every prompt automatically?

No. The agent runs glen search when a task calls for it, or when you ask.

Can I use Glen with an agent that has no plugin?

Yes, if it's an MCP client. It can search memory and use skills, and it can add a past conversation with glen_import when you ask.

Will Glen slow my agent down?

Hooks add a network round trip, and Glen's search skill says each search takes about 10 seconds. In Glen's own replay of 100 merged PRs, runs with Glen finished 21% faster with that time on the clock. The conditions are under Details.

What does it cost?

Free covers 15,000 memories and up to 3 people. Personal raises that to 250,000 memories and adds integrations. Team removes the limits and adds integrations.

What if a memory is wrong or out of date?

Follow the citation to its source, then forget the memory or remove it in the dashboard. Forgetting is reversible.

Try Glen

Run the install command and work as usual. After you've made a decision in one session, start a new one later and ask your agent to search for it. Your first 15,000 memories are free, no credit card.

npx @tryglen/cli@latest install

Start free

More field notes

Fix your agents’ amnesia.

Start on your own or with up to two teammates. Your first 15,000 memories are free, no credit card.

Start free