Claude Code harness and alternative to context compaction: at 80% context it writes a verified capsule, runs /clear and resumes with persistent memory in git.
It depends on what you want. aigent-os manages the context boundary itself (checkpoint, clear, resume) and keeps memory as markdown in git. claude-mem automatically captures what your agent does, compresses it with AI and injects it into later sessions. They solve overlapping problems in different ways and can coexist.
From the README’s Alternatives section (descriptions checked Oct 2026):
| If you want | Consider |
|---|---|
| Built in, zero setup | Claude Code’s own auto-compaction, /compact, /clear, CLAUDE.md and auto memory |
| Automatic capture of what your agent did, compressed and injected into later sessions | thedotmack/claude-mem |
| Less context used by tool output (sandboxed MCP tools), plus session events kept in SQLite and searched back in after a compaction | mksglu/context-mode |
| A long-term memory store shared by Claude Code and Codex: plain markdown files, a local ranked search index, and a background pass that consolidates memories | tigerless-labs/agent-memory |
| A memory service that learns across agents | vectorize-io/hindsight (aigent-os has an opt-in bridge) |
| Persistent teams of Claude Code, Codex and Pi agents | mvschwarz/openrig |
| Long-term memory and typed handoffs across 20+ agent tools, kept as a git-backed markdown wiki on a server you run | akitaonrails/ai-memory |
| A local-first desktop workspace for persistent AI teammates, with task queues, agent-to-agent messaging and an embedded browser | nightly-labs/openbot |
| One long-running Claude Code session that checkpoints, clears and resumes instead of compacting, with git-auditable memory | aigent-os |
git log. claude-mem keeps its store in SQLite and Chroma, outside version control.Full install (needs Claude Code, Node.js 18+ with npm, and bash; on Windows use Git Bash):
git clone https://github.com/wrg32786/aigent-os.git && cd aigent-os && bash install.sh --dry-run
The dry run prints the planned changes and writes nothing. When it looks right, run bash install.sh, open a new terminal and run aigent.
Just want the manual capsule commands? Install the context-capsule plugin inside Claude Code:
/plugin marketplace add wrg32786/aigent-os
/plugin install context-capsule@aigent-os
aigent-os manages the context boundary (checkpoint, clear, resume) and keeps memory as markdown in git. claude-mem captures what your agent does, compresses it with AI and injects relevant context into later sessions, with its store outside version control.
The README says these tools can coexist; they solve overlapping problems in different ways.
The project does not claim that. It is a different trade-off: an explicit, inspectable checkpoint and a clean window instead of a model-written summary.