Analysis updated 2026-05-18
Prevent Claude Code from losing important file paths and decisions during long sessions.
Keep persistent project rules and preferences across every context compaction.
Delay compaction until a session is closer to its true context limit.
Preserve the reasoning behind past bug fixes so they don't get rediscovered later.
| rodrigooler/claude-anchor | chrisor-dev/claude-autosync | dangerousyams/muxer | |
|---|---|---|---|
| Stars | 2 | 2 | 2 |
| Language | Shell | Shell | Shell |
| Setup difficulty | easy | moderate | moderate |
| Complexity | 2/5 | 3/5 | 3/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
One curl command or a Claude Code plugin install, no configuration required to get started.
Claude Anchor is a shell-based plugin for Claude Code, Anthropic's AI coding assistant, that solves a specific problem with long sessions. Every time Claude Code runs its built-in compact command to shrink a conversation that is running out of space, it tends to lose important details. Exact file paths get paraphrased, error messages and root causes get summarized away, the reasoning behind past decisions disappears, and any corrections or preferences expressed earlier get wiped out. Claude Anchor works by hooking into two lifecycle events that Claude Code fires around each compaction. A pre-compact hook runs just before compression and instructs Claude to preserve certain things word for word in the summary, such as file paths, error messages, decisions, and corrections. A post-compact hook runs immediately after and re-injects a file the user controls, called anchor-context.md, back into the session. That file lives at a fixed path in the user's Claude Code settings folder and can hold anything meant to persist across the whole session: tool preferences, project conventions, and notes about ongoing work. The plugin also adjusts when compaction triggers by raising the threshold to 85 percent of context capacity instead of the default, giving the session more room before compression kicks in. The README points to research from Factory.ai showing that structured, instruction-driven summarization retains context noticeably better than the default approach, especially over multiple compaction cycles. Installation is either a Claude Code plugin command or a single curl command, and no configuration is required to get started, though the compaction threshold percentage is adjustable, for example for models with much larger context windows. The project is written in Shell and released under the MIT license.
A Claude Code plugin that stops important context, like file paths and past decisions, from being lost every time a session compacts.
Mainly Shell. The stack also includes Shell, Claude Code.
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.