Context-compact – Summarize agent context instead of truncating it
agents. Not a custom truncation strategy, not a sliding window, not dropping old messages and hoping for the best. The failure mode is well-understood: your context window fills up, you truncate from the top, and the agent loses the thread. It forgets the task it was working on, the file path it just wrote to, the UUID it needs to reference. The conversation breaks. The problem is everyone keeps solving it by throwing away information instead. Truncation is fast to implement and quietly wrong. The agent appears to work until it doesn't, and debugging context loss in a long-running session is…
What it does
In the maker’s words, at launch
agents. Not a custom truncation strategy, not a sliding window, not dropping old messages and hoping for the best. The failure mode is well-understood: your context window fills up, you truncate from the top, and the agent loses the thread. It forgets the task it was working on, the file path it just wrote to, the UUID it needs to reference. The conversation breaks. The problem is everyone keeps solving it by throwing away information instead. Truncation is fast to implement and quietly wrong. The agent appears to work until it doesn't, and debugging context loss in a long-running session is painful. context-compact summarizes old messages via your LLM of choice and replaces them with a compact summary. Fires automatically at 85% context utilization. Preserves UUIDs, file paths, and URLs verbatim so identifiers survive compaction. Handles histories longer than the summarization model's own context window by chunking sequentially with a running summary carried forward. Works with Anthropic, OpenAI, or any SDK. Zero dependencies.
Does the same job
all alternatives →

- CSContext Surgeon – Let AI agents edit their own context windowApr 2026 · github.com · ▲5
AI agents accumulate stale tool results — file reads, web fetches, bash outputs — in their context window. Every one sits there for the entire conversation, consuming tokens and degrading quality. The standard fix is auto-compaction: wait until full, then drop content indiscriminately. Context Surgeon gives the agent three operations — evict, replace, and restore — so it can manage its own context. It works as a transparent local proxy that intercepts API requests, assigns IDs to content blocks, and applies eviction directives before forwarding. The agent calls the tools via bash. The proxy…



More ai this month
the category →
I trained a 125M-parameter transformer to autocomplete piano performances in real time (~108 notes/sec on an iPhone 15). The idea is basically GitHub Copilot or Tabnine, except instead of prompting it with code, you prompt it by playing a few notes on a MIDI piano. The model then continues what you played, entirely on-device. The app is free if anyone wants to try it. Happy to answer questions about the model, training, Core ML, or the many things that didn't work.
AI · 17d ago · simedw.com
Astute▲585Automate your B2B brand going viral, with new media creators
AI · 18d ago · company-app.joinastute.com


Hey HN, Henry from Cactus here! We previously released Cactus Needle, a 14MB agentic LLM for tool call, device use, and structured extraction for phones, wearables, smart homes, small robots and microcontrollers. We got really great feedback here, and have now incorporated the suggestions to release Needle 2. The whole model is a single 14MB binary that runs a full session in 28MB of RAM; 45m parameters at 2bit compression. Needle hits 500 tokens/sec decode speed on a Raspberry Pi 5, sits between 400-1,500 tokens/sec on VR devices like Meta Quest 3S and Apple Vision Pro, and ranges…
AI · 26d ago · cactuscompute.com


Launched alongside, March 2026
the whole month →

Switch from ChatGPT to Claude with import memory feature
AI · Mar 2026 · claude.com


