New Tool Injects Instructions into Claude Code Based on Context Usage

A developer frustrated with Claude Code hitting context limits mid-task has created a tool that monitors context usage and injects custom instructions when thresholds are crossed — allowing Claude to act on warnings before it is too late.
The Problem
Claude Code auto-compaction often happens at the worst times. The standard 20% warning usually comes too late to do anything useful, resulting in lost context and interrupted workflows.
The Solution
The cc-context-awareness tool uses the status line and hooks to set custom warning thresholds. The key innovation: messages get injected mid-task (inside the agentic loop), so Claude can actually act on them.
Use Cases
- Deterministic handoffs — At 75% context, Claude writes a session summary to a memory file, then suggests /compact. After compaction, it reads the file and continues.
- Graduated warnings — Gentle nudge at 60%, serious warning at 80%, full stop at 95%. Good for long sessions with progressive nudges.
- Autonomous agent loops — Write state and close out at 50-60% usage, staying well below the "dumb zone" where quality degrades.
- Long-horizon tasks — Multi-file refactors, extended debugging. Checkpoint and wrap up before quality drops.
Installation
One-liner install:
curl -fsSL https://raw.githubusercontent.com/sdi2200262/cc-context-awareness/main/install.sh | bash
The tool installs as a skill, so you can ask Claude to help configure thresholds, change bar styles, and customize behavior.
📖 Read the full source: r/ClaudeAI
👀 See Also

Claude-Code v2.1.76 adds MCP elicitation, worktree optimizations, and numerous fixes
Claude-Code v2.1.76 introduces MCP elicitation support for structured input mid-task, adds worktree.sparsePaths for monorepo efficiency, and fixes 20+ issues including deferred tool schema loss, slash command problems, and Remote Control session stability.

jsongrep: A DFA-Based JSON Query Tool That Outperforms jq in Benchmarks
jsongrep is a Rust-based command-line tool for querying JSON documents using a regular language syntax that compiles to deterministic finite automata (DFA), achieving faster search times than jq, jmespath, jsonpath-rust, and jql in benchmarks.

codebase-md: Tool auto-generates CLAUDE.md with git hook maintenance
codebase-md v0.1.0 scans projects to generate CLAUDE.md files with architecture detection, dependency health checks, and git insights. It includes git hooks to keep documentation fresh and supports other AI coding tools with additional config files.

Meera: A Fully Offline AI Assistant for Linux Gnome Built on Qwen3.5-2B
Meera is an offline AI assistant for Gnome Desktop that uses Qwen3.5-2B-Q4_K_M (1.2 GB) and llama-cpp with Vulkan support. It leverages a second tiny embedding model for tool selection and RAG, avoiding prompt embedding bloat. Works on Ubuntu 24.04 with RTX 5090 and Fedora Silverblue on Intel i3.