aigent-os

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.

View the Project on GitHub wrg32786/aigent-os

How do I run long Claude Code sessions without losing context?

Checkpoint before the window fills, clear, and reload the checkpoint, so the work survives each boundary. aigent-os automates that loop and keeps your notes, decisions and open threads as plain markdown in git, so a session can keep cycling through refreshes without you re-briefing it.

How aigent-os does it

Resuming isn’t blind trust either: the capsule is treated as reference, and live state wins on resume.

Install

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

Limits

Full list: the Known limits section of the v1.1.0 release notes.

FAQ

Can Claude Code work on one task for hours?

That is what aigent-os is built for: one long-running session that keeps cycling through refreshes. The public evidence is 11 of 11 cycles on one machine, which is not a reliability guarantee.

How do I make Claude Code remember things between sessions?

aigent-os adds a git-tracked markdown vault that every session reads at start and writes at checkpoints, on top of Claude Code’s own CLAUDE.md and auto memory.

Does my data leave my machine?

aigent-os has no server. Your vault is local files and semantic search runs locally. Claude Code still sends your conversation to Anthropic, and vault sync pushes memory commits to the remote you approved.

More