{"id":51433366,"url":"https://github.com/jimovonz/claude-context-manager","last_synced_at":"2026-07-05T05:04:45.203Z","repository":{"id":329082324,"uuid":"1116713474","full_name":"jimovonz/claude-context-manager","owner":"jimovonz","description":"Context management hooks for Claude Code - prevent premature compaction","archived":false,"fork":false,"pushed_at":"2026-04-01T21:25:12.000Z","size":1513,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-05T05:04:34.833Z","etag":null,"topics":["claude","claude-code","context-management","hooks","llm"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jimovonz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-15T09:21:46.000Z","updated_at":"2026-04-01T21:25:16.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/jimovonz/claude-context-manager","commit_stats":null,"previous_names":["jimovonz/claude-context-manager"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jimovonz/claude-context-manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimovonz%2Fclaude-context-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimovonz%2Fclaude-context-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimovonz%2Fclaude-context-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimovonz%2Fclaude-context-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jimovonz","download_url":"https://codeload.github.com/jimovonz/claude-context-manager/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimovonz%2Fclaude-context-manager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35143855,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-05T02:00:06.290Z","response_time":100,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["claude","claude-code","context-management","hooks","llm"],"created_at":"2026-07-05T05:04:44.634Z","updated_at":"2026-07-05T05:04:45.190Z","avatar_url":"https://github.com/jimovonz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Claude Context Manager\n\n\u003e **This project is no longer maintained.**\n\u003e\n\u003e CCM was built when Claude Code had a 200k token context window and compaction was a constant pain point. With the introduction of 1M token contexts, the core problem CCM solved is far less pressing. Additionally, CCM relies on patching the Claude Code CLI binary (`cli.js`), which creates a significant maintenance burden as the CLI evolves — each update risks breaking the patches.\n\u003e\n\u003e **Last tested with:** Claude Code 2.1.25\n\u003e\n\u003e The code remains available for reference, but no further updates are planned. Use at your own risk with newer versions.\n\u003e\n\u003e **Looking for the hook and caching functionality?** The standalone hook components (tool output interception, content-addressable caching, filtered retrieval) have been extracted into [claude-context-hooks](https://github.com/jimovonz/claude-context-hooks) — no CLI patching required.\n\n---\n\n[![Version](https://img.shields.io/badge/version-1.2.0-blue.svg)](https://github.com/jimovonz/claude-context-manager)\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)\n[![Python](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/)\n[![Platform](https://img.shields.io/badge/platform-Linux-lightgrey.svg)](https://www.linux.org/)\n[![Claude Code](https://img.shields.io/badge/claude--code-2.1.25-purple.svg)](https://claude.ai/claude-code)\n[![Status](https://img.shields.io/badge/status-archived-red.svg)]()\n\nHooks and tools for managing Claude Code's context window to prevent premature compaction.\n\n**Platform Support:** Linux only. No Windows testing has been done.\n\n![Claude Code with CCM: 5% autocompact buffer and reduced system prompt (2.9k tokens)](claud_context.png)\n\n*Custom system prompts are possible via the thinking proxy. This screenshot shows a fully functional session with a minimal system prompt (2.9k tokens vs default ~19.5k) - demonstrating that Claude Code remains completely workable with minimal compromises while maximizing available context.*\n\n## The Problem\n\nClaude Code's context window is finite. When filled, automatic compaction discards content - often removing critical reasoning chains and decisions mid-task. Large tool outputs (grep results, build logs, file listings) are the primary cause.\n\n## The Solution\n\nThis system intercepts tool calls to manage context proactively:\n\n1. **Execute in hooks** - Commands run inside hooks, results cached if large\n2. **Return references** - Main agent gets pointers to cached data, not the data itself\n3. **Delegate to subagents** - Task agents access full content without polluting main context\n4. **External compaction** - Route summarization to cheaper external LLMs via OpenRouter\n5. **Purge on demand** - `/purge` command truncates old outputs\n\n## Two Modes of Operation\n\n### Basic Mode (no API key)\n\nWithout an OpenRouter API key, CCM provides:\n- Hook interception (caching large outputs)\n- Subagent delegation\n- Manual `/purge` command\n- CLI patches for better context thresholds\n\n**Limitation:** Compaction still uses Claude's built-in summarization. Standard Claude Code context limits apply.\n\n### Full Mode (with OpenRouter API key) ⭐\n\nWith an OpenRouter API key, CCM unlocks:\n- **External compaction** — Routes summarization to Gemini Flash (cheaper, higher output limits)\n- **Custom distillation prompts** — Model-optimized prompts for better summaries\n- **Project context extraction** — Guaranteed preservation of technical details\n- **Recovers ~22k tokens** — Claude's compaction buffer becomes usable\n\n**This is the recommended configuration for maximum benefit.**\n\n```bash\n# Set up OpenRouter (one-time)\ncat \u003e ~/.claude/credentials.json \u003c\u003c 'EOF'\n{\"openrouter\": {\"api_key\": \"sk-or-v1-your-key-here\"}}\nEOF\nchmod 600 ~/.claude/credentials.json\n```\n\nGet your API key at [openrouter.ai](https://openrouter.ai) (~$5 credit goes a long way).\n\n## Compatibility\n\n### Claude Code 2.1.9+\n\nCCM is tested with Claude Code 2.1.9 through 2.1.25. The `c` launch command automatically creates a patched CLI mirror to fix several issues:\n\n| Patch | Issue | Fix |\n|-------|-------|-----|\n| **Trigger** | `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE` uses `Math.min` - can only lower threshold | Changed to `Math.max` - allows raising threshold |\n| **Display** | `/context` buffer display ignores env var override | Now uses same threshold function as trigger |\n| **Pct Base** | Percentage calculated from available context (136k) not total (200k) | Now calculates from total context window |\n| **Hook Reply** | Hook block responses shown as \"error\" | Changed to \"reply\" for clarity |\n| **File Injection** | Full file diffs injected into context on external changes | Replaced with minimal notification |\n| **Threshold** | Warning/error buffers too large (20k) | Reduced to trigger near autocompact (~94%) |\n| **Blocking Limit** | Context blocking at 67% with high thresholds | Aligned with autocompact threshold |\n\n**Note:** Hook block responses also use a `\"None - \"` prefix at the hook level (e.g., `Error: None - Exit 0:`) to signal successful operations regardless of CLI version. This is independent of the patches above.\n\n**New in 2.1.9+:**\n- **additionalContexts** - Hook responses can now include model-only guidance that doesn't clutter user output\n- **${CLAUDE_SESSION_ID}** - Skills can access the current session ID via template substitution\n- **Setup hook** - CCM can run initialization tasks on session start (proxy check, cache cleanup, patch validation)\n\n**Patching approach:** The patcher creates a mirror at `~/.claude/patched/claude-code/` — symlinks for all files except `cli.js` which is copied and patched. This survives CLI auto-updates (re-patches automatically when the source hash changes) while preserving Node.js module resolution for skills.\n\n**Manual patch operations:**\n```bash\n~/.claude/hooks/patch-autocompact.py --check   # Check patch status\n~/.claude/hooks/patch-autocompact.py --patch   # Apply patches to mirror\n~/.claude/hooks/patch-autocompact.py --restore # Restore from backup\n```\n\n### Skills\n\nCCM preserves all Claude Code skills (`/recap`, `/relay`, `/ccm`, etc.). Skills are loaded from:\n- `~/.claude/skills/` - User skills (symlinked to `~/.claude/commands/`)\n- `.claude/skills/` - Project-specific skills\n\nThe `c` command ensures skills load correctly by using a patched mirror that preserves the original directory structure, maintaining Node.js module resolution for skill loading.\n\n### Claude Code 2.0.75+\n\nWorks without patches. Original target version.\n\n## Requirements\n\n- **Linux** (no Windows support)\n- Python 3.10+\n- Claude Code CLI v2.0.75+ installed\n- `aiohttp` for the thinking proxy: `pip install aiohttp`\n- (Optional) OpenRouter API key for external compaction\n- (Optional) `tiktoken` for accurate token counting: `pip install tiktoken`\n\n## Quick Start\n\n**One-line install:**\n```bash\ncurl -fsSL https://raw.githubusercontent.com/jimovonz/claude-context-manager/main/install.sh | bash\n```\n\n**Or manual install:**\n```bash\ngit clone https://github.com/jimovonz/claude-context-manager.git\ncd claude-context-manager\npip install aiohttp tiktoken\npython3 install.py\n```\n\nThen launch Claude with CCM:\n```bash\nc\n```\n\nIf `c` is not found, add to `~/.bashrc` or `~/.zshrc`:\n```bash\nexport PATH=\"$HOME/.local/bin:$PATH\"\n```\n\n## The `c` Command\n\nThe `c` command launches Claude Code with CCM integration:\n\n```bash\nc                           # Launch with proxy and permissions skip\nc --resume abc123           # Resume a session\nc -p \"do something\"         # Run with prompt\n```\n\nWhat `c` does:\n1. Starts the thinking proxy (if not running)\n2. Patches CLI if needed (for 2.1.x compatibility)\n3. Runs `claude` with env vars scoped to that process only:\n   - `ANTHROPIC_BASE_URL` - Routes through proxy\n   - `ANTHROPIC_CUSTOM_HEADERS` - Session ID for tracking\n   - `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE` - Compaction threshold\n4. Adds `--dangerously-skip-permissions`\n\nNo terminal pollution - env vars are only set for the claude process.\n\n### Configuration\n\nSettings are read from `~/.claude/hooks/config.py`. Override per-session with env vars:\n\n```bash\nCOMPACT_PCT=90 c                    # Different threshold (overrides AUTOCOMPACT_THRESHOLD)\nSKIP_PERMISSIONS=false c            # Prompt for permissions\nTHINKING_PROXY_PORT=9000 c          # Different port\nTHINKING_PROXY_ENABLED=False c      # Disable proxy (direct API access)\n```\n\n## External Compaction (Optional)\n\nRoute Claude's automatic compaction to external LLMs (Gemini, GPT-4, etc.) via OpenRouter. Benefits:\n\n- **Cheaper** - Use smaller, cheaper models for summarization\n- **Better summaries** - Custom distillation prompts with artefact extraction\n- **More context** - Recover the 22.5k token buffer Claude reserves\n\n### Setup\n\n1. Get an OpenRouter API key from [openrouter.ai](https://openrouter.ai)\n\n2. Create credentials file:\n```bash\ncat \u003e ~/.claude/credentials.json \u003c\u003c 'EOF'\n{\n  \"openrouter\": {\n    \"api_key\": \"sk-or-v1-your-key-here\"\n  }\n}\nEOF\nchmod 600 ~/.claude/credentials.json\n```\n\nOr set environment variable:\n```bash\nexport OPENROUTER_API_KEY=\"sk-or-v1-your-key-here\"\n```\n\n3. Enable in config (enabled by default if key is present):\n```python\n# ~/.claude/hooks/config.py\nEXTERNAL_COMPACTION_ENABLED = True\n```\n\n### How It Works\n\nWhen Claude triggers compaction, the proxy:\n\n1. **Detects** compaction request via system prompt pattern\n2. **Transforms** Claude messages to OpenAI format\n3. **Routes** to OpenRouter (Gemini Flash by default)\n4. **Extracts artefacts** (commands, paths, errors) for preservation\n5. **Generates distillation** with full context of artefacts\n6. **Extracts project context** (files, commands, hosts, endpoints) via regex\n7. **Appends gap-fill** — only project context items the LLM missed\n8. **Returns** summary in Claude SSE format\n\n### Project Context Extraction\n\nAfter the LLM generates its distillation, a local regex-based extractor scans the original messages for:\n\n- **Files accessed** — paths from Read/Edit/Write with operation counts\n- **Commands run** — significant bash commands (deduped)\n- **Remote hosts** — SSH and relay connections\n- **Endpoints/ports** — API URLs, localhost ports\n- **Git state** — branch, ahead/behind status\n- **Config files** — .env, credentials, settings files\n\nThe extractor performs **fuzzy deduplication** against the LLM output, only appending items the LLM missed. The header shows coverage: `[gap-fill: 5/12 new (42%)]`\n\nThis guarantees technical details survive compaction regardless of LLM summarization quality.\n\n### Model Selection\n\nConfigure in `~/.claude/hooks/config.py`:\n\n```python\nCOMPACTION_MODELS = {\n    'early': 'google/gemini-3-flash-preview',   # Compactions 1-5\n    'late': 'google/gemini-3-flash-preview',    # Compactions 6+\n}\n\nCOMPACTION_MAX_TOKENS = {\n    1: 20000,\n    2: 36000,\n    3: 52000,\n    4: 64000,\n    5: 64000,\n    'default': 64000\n}\n```\n\n## Thinking Proxy\n\nThe thinking proxy manages Claude's thinking blocks and routes compaction requests.\n\n### Features\n\n- **Session tracking** - Tracks sessions for thinking block management\n- **Compaction routing** - Routes `/compact` to external LLMs\n- **No-thinking mode** - Strips thinking after purge to prevent API errors\n- **System prompt abbreviation** - Replaces ~13KB default prompt with ~2.9KB version\n- **Tool abbreviation** - Reduces tool descriptions by ~40KB\n\n### System Prompt Customization\n\nThe proxy replaces Claude's verbose default system prompt (~13KB) with an abbreviated version (~2.9KB), saving ~10k tokens per request.\n\n**Configuration:**\n```python\n# ~/.claude/hooks/config.py\nABBREVIATE_SYSTEM_PROMPT = True   # Enable prompt abbreviation\nABBREVIATE_TOOLS = True           # Enable tool description abbreviation\n```\n\n**Custom system prompt:**\n\nCreate `~/.claude/system-prompt.txt` to use your own prompt:\n\n```bash\ncat \u003e ~/.claude/system-prompt.txt \u003c\u003c 'EOF'\nYou are a helpful coding assistant. Be concise and direct.\n\n# Your custom instructions here...\nEOF\n```\n\nThe custom prompt will be used instead of the built-in abbreviated version. CCM will still append preserved skills (relay, ccm, etc.) from the original prompt.\n\n### Starting the Proxy\n\n```bash\n# Linux (systemd) - auto-installed\nsystemctl --user start ccm-thinking-proxy\nsystemctl --user enable ccm-thinking-proxy  # Start on login\n\n# Manual (any platform)\n~/.claude/hooks/thinking-proxy.py start   # Start daemon\n~/.claude/hooks/thinking-proxy.py status  # Check status\n~/.claude/hooks/thinking-proxy.py stop    # Stop daemon\n~/.claude/hooks/thinking-proxy.py restart # Restart daemon\n```\n\n### Debugging\n\nEnable debug logging:\n```python\n# ~/.claude/hooks/config.py\nTHINKING_PROXY_DEBUG_LOG = True\n```\n\nCheck logs:\n```bash\ntail -f ~/.claude/proxy.log\n```\n\nCompaction debug files:\n- `~/.claude/last-compaction-request.json` - Full request to OpenRouter\n- `~/.claude/last-project-context.txt` - Extracted project context (gap-fill)\n- `~/.claude/last-artefacts.txt` - Extracted artefacts\n- `~/.claude/last-distillation.txt` - Final distillation output\n\n## Installation Details\n\n### What Gets Installed\n\n```\n~/.claude/\n├── hooks/\n│   ├── intercept-bash.py      # Bash command interception\n│   ├── intercept-glob.py      # File glob interception\n│   ├── intercept-grep.py      # Grep/ripgrep interception\n│   ├── intercept-read.py      # Large file read interception\n│   ├── context-monitor.py     # Context usage warnings\n│   ├── learn-large-commands.py # Pattern learning\n│   ├── pre-compact.py         # Custom compaction instructions\n│   ├── thinking-proxy.py      # Thinking block proxy\n│   ├── patch-autocompact.py   # CLI patcher for 2.1.x\n│   ├── claude-session-purge.py # Session purge tool\n│   ├── ccm-setup.py           # Setup hook (2.1.9+)\n│   ├── config.py              # Configuration\n│   ├── c                      # Launch command\n│   └── lib/                   # Shared libraries\n├── commands/                  # Skill definitions\n│   ├── ccm.md                 # /ccm slash command\n│   ├── recap.md               # /recap slash command\n│   └── relay.md               # /relay slash command\n├── skills -\u003e commands         # Symlink for Claude Code compatibility\n├── setup.sh                   # Shell function setup\n├── compact-instructions.txt   # Compaction instructions (customizable)\n├── credentials.json           # API keys (you create this)\n├── proxy-state/               # Proxy session state\n└── settings.json              # Hook registration (merged)\n```\n\n## Uninstallation\n\n```bash\npython3 uninstall.py\n```\n\n## Quick Disable/Enable\n\nIf hooks cause issues, quickly disable without uninstalling:\n\n```bash\npython3 disable.py   # Disable all hooks (keeps files)\npython3 enable.py    # Re-enable hooks\n```\n\nOr use environment variable for a single session:\n```bash\nCLAUDE_HOOKS_PASSTHROUGH=1 claude\n```\n\n## Usage\n\n### Important: \"Blocking\" Is Not an Error\n\nWhen hooks intercept a tool call, Claude Code displays it as an \"error\" or \"blocking\" message in the terminal. **This is normal behavior, not an actual error.** The hook has:\n\n1. Executed the command successfully\n2. Returned the results (inline or cached)\n3. Prevented double-execution by \"blocking\" the original call\n\nSuccessful operations display as `Error: None - Exit 0:` followed by the output. The `None - ` prefix signals to the model that despite the `Error:` label (which the CLI always adds), the operation succeeded. Only responses without the `None - ` prefix are genuine errors.\n\n### Automatic Interception\n\nOnce installed, hooks work automatically:\n\n- **Small outputs** pass through normally\n- **Large outputs** (\u003e2KB) are cached to `~/.claude/cache/`\n- **Subagent calls** bypass interception (full access for Task agents)\n\nWhen you see a cache stub:\n```\n[CCM_CACHED]\nkey: sha256:abc123...\nsource: Bash cat ~/.bashrc\nbytes: 45678\n~tokens: 11k\nlines: 1234\npinned: none\nsee: CLAUDE.md → CCM:RETRIEVAL-GUIDANCE\n[/CCM_CACHED]\n```\n\nOptions:\n1. Spawn a Task agent to summarize or extract specific information\n2. Use offset/limit parameters to paginate the original read\n3. Retrieve full content if truly needed: `~/.claude/hooks/ccm-get.py \u003ckey\u003e`\n\n### Context Warnings\n\nAt 70%, 80%, 90% context usage (configurable), you'll see warnings:\n```\nWARNING: Context at 72% (~144,000 tokens, tiktoken). Consider running /purge soon.\n```\n\n### The `/purge` Command\n\nWhen context is critical, run `/purge` to:\n- Truncate large tool outputs to CCM stubs\n- Preserve recent context\n- Restart session with preserved state\n\n**Note:** `/purge` is less necessary when using external compaction via OpenRouter, as the custom compaction already performs intelligent summarization with artefact extraction.\n\n### Auto-Compaction Control\n\nCompaction triggers at 95% context by default (configurable via `COMPACT_PCT` or `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE`).\n\nWith the 2.1.x patches, this means 95% of the **total** 200k context window (190k tokens), not 95% of available context.\n\n### Custom Compaction Instructions\n\nWhen compaction occurs, `pre-compact.py` provides instructions for what to preserve. Customize by editing:\n```bash\n~/.claude/compact-instructions.txt\n```\n\n## Configuration\n\nEdit `~/.claude/hooks/config.py`:\n\n```python\n# Cache settings\nCACHE_DIR = Path.home() / '.claude' / 'cache'\nCACHE_MAX_AGE_MINUTES = 60\n\n# Output thresholds (bytes)\nBASH_THRESHOLD = 2000\nGLOB_THRESHOLD = 2000\nGREP_THRESHOLD = 2000\nREAD_THRESHOLD = 25000\n\n# Auto-compaction\nAUTOCOMPACT_ENABLED = True\nAUTOCOMPACT_THRESHOLD = 95   # percent of context\n\n# Pre-compact hook\nPRE_COMPACT_ENABLED = True\n\n# Context monitor\nCONTEXT_MONITOR_ENABLED = True\nCONTEXT_WARN_THRESHOLDS = [70, 80, 90]\n\n# External compaction\nEXTERNAL_COMPACTION_ENABLED = True\nPROJECT_CONTEXT_EXTRACTION_ENABLED = True  # Gap-fill extraction\n# API key loaded from ~/.claude/credentials.json or OPENROUTER_API_KEY env var\n\n# Thinking proxy\nTHINKING_PROXY_ENABLED = True\nTHINKING_PROXY_PORT = 8080\nABBREVIATE_SYSTEM_PROMPT = True  # Replace ~13KB prompt with ~2.9KB\nABBREVIATE_TOOLS = True          # Reduce tool descriptions\n# Custom prompt: create ~/.claude/system-prompt.txt\n\n# Metrics logging\nMETRICS_ENABLED = True  # Logs to ~/.claude/hooks/metrics.log\n```\n\n## Files That Bypass Interception\n\nThese always pass through unmodified:\n- `CLAUDE.md`, `README.md` - Project documentation\n- `*.json`, `*.yaml`, `*.yml`, `*.toml` - Configuration\n- `*.lock`, `*.env*` - Lock and environment files\n\n## Troubleshooting\n\n### Bypass hooks temporarily\n```bash\nCLAUDE_HOOKS_PASSTHROUGH=1 claude\n```\n\n### Bypass proxy temporarily\n```bash\nunset ANTHROPIC_BASE_URL\nclaude\n```\n\n### Analyze session without changes\n```bash\n~/.claude/hooks/claude-session-purge.py --current --analyze\n```\n\n### Clear cache\n```bash\nrm -rf ~/.claude/cache/*\n```\n\n### Check proxy status\n```bash\n~/.claude/hooks/thinking-proxy.py status\n```\n\n### View proxy logs\n```bash\ntail -f ~/.claude/proxy.log\n```\n\n### Re-patch CLI after update\n```bash\n~/.claude/hooks/patch-autocompact.py --restore  # Restore original\n~/.claude/hooks/patch-autocompact.py --patch    # Re-apply patches\n# Or just run c - it auto-patches if needed\n```\n\n## Documentation\n\n- **Architecture (all components):** `docs/ARCHITECTURE.md`\n- Context management: `hooks/CONTEXT_MANAGEMENT.md`\n- CLI patching \u0026 skills: `docs/CLI_PATCHING.md`\n- External compaction: `docs/EXTERNAL_COMPACTION.md`\n\n## License\n\nMIT\n\nJimovo\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjimovonz%2Fclaude-context-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjimovonz%2Fclaude-context-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjimovonz%2Fclaude-context-manager/lists"}