Shared memory for AI coding agents

Agents that remember the project.

Eagle Mem gives Claude Code, Codex, and Google Antigravity one hook-backed memory layer, gives Grok the same skills and CLI memory surface, and protects releases with local SQLite guardrails. Install once. Every future session starts warmer, safer, and less wasteful.

1 DB Claude Code, Codex, Grok, and Antigravity share `~/.eagle-mem/memory.db`.
4 surfaces Claude Code, Codex, and Antigravity get hooks; Grok gets skills and CLI access.
0 daemons Hooks, SQLite, FTS5, jq, and bash. No hosted service required.
v4.15.0 Synchronous PreCompact capture writes a rich session summary before Claude Code collapses the context window (manual or auto), so the enriched recap is never lost to compaction — on the v4.14 governance parity and v4.13 security & reliability hardening.
The product

Three jobs, one local layer.

Eagle Mem is not a second brain pasted onto the side. It sits inside the agent loop, so recall, safety, and handoff data are created where the work actually happens.

01 - Recall

Project memory that survives compaction

Session summaries, decisions, gotchas, key files, mirrored memories, tasks, plans, and indexed code are loaded automatically at the next startup or prompt.

02 - Guardrails

Regression checks before release

File-level guardrails and feature verification turn advisory memory into an enforced release boundary for push, PR, and publish commands.

03 - Lanes

Durable orchestrator and worker lanes

Split broad work into owned lanes, launch the opposite agent in isolated git worktrees, and bring the worker's handoff back into the same project memory.

Install

One command, then open your agent.

Eagle Mem installs hooks for Claude Code, Codex, and Google Antigravity, links Grok skills when `~/.grok` is present, runs schema migrations, enables patch auto-updates, and keeps the local database under your home directory.

npm install -g eagle-mem
eagle-mem install
What users see now Eagle Mem v4.15.0 Shared memory, clean session capture, guardrails, lanes, and durable handoffs Core install setup hooks, database, skills update redeploy hooks and migrations search recall sessions, memories, code memories sync agent memory files inspect inspect sessions, events, and trusted surfaces replay replay event timelines for debugging Safety feature verify release-impacting changes guard manage regression rules compaction inspect context-survival readiness config choose providers and RTK behavior Coordination orchestrate agent-run worker lanes in git worktrees tasks mirrored task state across agents
Installer behavior

It updates the agent documents too.

The installer is not only copying shell scripts. It wires Eagle Mem into the places Claude Code, Codex, Grok, and Antigravity actually read on startup, then keeps those files current on `eagle-mem update`.

Claude Code

Registers lifecycle hooks in `~/.claude/settings.json`, links Eagle Mem skills into `~/.claude/skills`, and creates or updates the Eagle Mem section in `~/.claude/CLAUDE.md` so Claude knows the memory, verification, and orchestration protocol.

Codex

Enables `codex_hooks` in `~/.codex/config.toml`, registers hooks in `~/.codex/hooks.json`, links skills into `~/.codex/skills`, and creates or updates `~/.codex/AGENTS.md` with a clean-output contract so Codex does not print internal capture blocks to the user.

Grok

Links Eagle Mem skills into `~/.grok/skills` and uses `eagle-mem grok-bootstrap` to verify the setup. Grok can search memory, inspect tasks, coordinate lanes, and check Compaction Survival through the shared CLI. Native lifecycle hooks can be added later if Grok exposes compatible hook points.

Orchestrator and worker mode

Broad work can split into owned lanes.

Eagle Mem treats orchestration as an agent-run workflow. The active agent becomes the coordinator, creates durable lanes, launches the opposite agent in a git worktree, and records each worker's status back into the same project memory.

Stable project identity

In monorepos and multi-app workspaces, agents can move between nested folders without splitting memory into separate projects. Hooks and statuslines resolve back to the session workspace, then repair stale rows safely.

Opposite-agent defaults

Codex coordinators default to Claude Code workers. Claude Code coordinators default to Codex workers. The selected worker model, effort, branch, worktree, PID, log, and validation command are stored with the lane.

Worktree handoff

`eagle-mem orchestrate spawn` creates an isolated worktree, writes a self-contained worker prompt, launches the worker CLI, syncs completion or blockers, and mirrors the lane into shared tasks so the next session can resume cleanly.

Proof path

A Codex coordinator can run `eagle-mem orchestrate spawn proof --foreground`, launch Claude Code with `claude-opus-4-7` at `xhigh`, then confirm the completed lane with `eagle-mem orchestrate --json`, `eagle-mem tasks completed`, and `eagle-mem orchestrate handoff`.

How it moves

Every turn can teach the next one.

Hooks capture lightweight observations. Stop hooks store rich summaries. SessionStart and UserPromptSubmit inject only the pieces that matter for the current project and prompt.

Hooks

SessionStart, PreToolUse, UserPromptSubmit, PostToolUse, Stop, SessionEnd.

SQLite + FTS5

Sessions, summaries, memories, tasks, guardrails, features, and code chunks.

Next Agent

Claude Code, Codex, and Antigravity recall through hooks; Grok can inspect the same project memory through skills and CLI commands.

What changed

v4.15.0 captures a rich summary before every compaction.

Eagle Mem already survived compaction through per-turn capture and reload, but the enriched summary was produced by a background job that, on auto-compaction, could finish after the context window had already collapsed. The new PreCompact hook runs that enrichment synchronously, before compaction — for both manual and auto triggers. It is side-effect-only: it never blocks compaction and never overwrites an agent-authored eagle-mem session save, which is already richer and already survives. This builds on v4.14.0 governance parity (eagle-mem gate, curator rule provenance) and the v4.13 full-spectrum security & reliability hardening — with normal recall and capture unchanged.

For agent compatibility

Claude Code, Codex, Grok, Antigravity, and OpenCode now have clearer integration surfaces, documented capabilities, and a shared expectation: memory should stay source-attributed and locally inspectable.

For compaction survival

The runtime can assess durable summaries, task state, orchestration lanes, and restore data so agents do not keep implementing blindly when context risk becomes too high.

For governance partners

Eagle Mem supplies durable recall, events, and verification evidence while project governance hooks decide when to warn, block, or force a handoff.