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.
- 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.
- 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.
- 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. - 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.
- 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 forgetstops it being recalled.
Glen, repo files and built-in memory compared
| Repo files (AGENTS.md, CLAUDE.md, rules) | Built-in agent memory | Glen | |
|---|---|---|---|
| Best for | Rules every session must follow | One developer's preferences and corrections | Why decisions were made, and what teammates and other agents worked out |
| Who writes it | People, by hand | The agent, from your sessions | Hooks record sessions; a pipeline stores memory |
| How the agent gets it | Loaded at session start | Varies by agent (below) | The agent runs glen search |
| Who can read it | Anyone with the repo | One machine, in Claude Code | Your organization (Privacy Policy, section 4) |
| Main limit | Holds only what someone wrote and kept current | Doesn't reach teammates | Hosted only; recall depends on the agent searching |
Built-in memory varies, and these limits were current in November 2026:
- Claude Code: auto memory is on by default, machine-local, and loads the first 200 lines or 25 KB of its index each session.
- Codex: memories are off by default and stored under your Codex home directory. AGENTS.md files load up to 32 KiB by default.
- Cursor: staff say Memories was removed starting in 2.1.x. What it documents now is rules and AGENTS.md.
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
- Teams that need self-hosting. Glen has no self-hosted build.
- Teams whose members shouldn't see each other's sessions. Teammates and their AI assistants can find recorded conversations through search (Privacy Policy, section 4).
- Rules that must apply every time. Glen's recall depends on the agent searching, so use repo files.
- One developer, one agent, one machine. Built-in memory and repo files may be enough.
- Adding a memory API to your own product. Glen's roundup points to Supermemory or Mem0 for that.
Details
Setup and supported agents
You need Node.js and a Glen account. The setup command is:
npx @tryglen/cli@latest install
- Claude Code: the command installs the CLI, signs you in and adds the plugin.
- Codex: setup guide.
- Cursor: add the plugin from the agent chat.
- Pi: install the package, then restart or
/reload. - Grok Build: setup guide. Glen doesn't connect to the grok.com app.
- Other MCP clients: connect to
https://mcp.tryglen.com/mcpwith OAuth or a personal API key. The Claude connector, for example, does not capture your chats.
What the hooks do
- Claude Code and Codex: Claude Code's and Codex's hook files run
glen session-startat session start,glen ingeston prompt submit and on stop, andglen pr-linkafter 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
- Cursor and Pi: your prompt, the agent's final reply, the repository name, branch, commit and remote URL, the agent name and a session id, plus content-free CLI error codes you can turn off with
glen telemetry disable. - Claude Code: the turn also includes tool calls, tool results and thinking blocks from the session transcript, so it can contain file contents and command output.
- Connected tools: Slack is limited to public channels, never DMs or private channels. GitHub can include private repositories (Privacy Policy, section 2).
Permissions and privacy terms
- Inside your organization: teammates and their AI assistants can find recorded conversations through search (section 4).
- Other organizations: Glen never returns another organization's data.
- Removed members: the MCP server rechecks membership on every request.
- Model training: Glen does not use Customer Content to train AI models (section 3).
- Vendors: listed on the sub-processors page.
- Retention: Customer Content does not expire automatically (section 6).
- Account deletion: what you added stays with the organization, labeled with your name and email, unless you ask Glen to remove it (section 6).
User controls
glen incognito: recall keeps working and nothing goes to team memory. Glen keeps a copy, with secrets removed, for authorized staff troubleshooting (section 2), and admins see a count of your prompts.glen silent: recording continues, and search returns nothing.glen off: recalls nothing and records nothing on every machine and agent.glen forget: hides a memory from search answers but doesn't delete it (section 6).glen_restorebrings it back.
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