Context-compact
Summarize agent context instead of truncating it
Get picks like this daily. Today's launch numbers, the top launches, AI and tech news, and a daily opportunity pick, straight to your inbox.
Want to reach these readers? Sponsor an issue.
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.
HN · launched Mar 7, 2026 · 6 upvotes (top 71%) · 0 views
Niche: ai agent memory infrastructure · 350 launches, 11 in the last 7 days ▼ -58% · Explore this niche →
Category and tags
- Horizontal
- Dev tools
- Developer
- AI-native
- Hobby / open-source project
Visit website ↗ Source listing ↗
More like this: all 350 launches in ai agent memory infrastructure →
Could you build this?
Yes Context-compact is a utility library that intercepts agent conversation histories and summarizes older messages via LLM calls rather than blindly truncating them.
Discussion
2 comments analyzed.
Competitors mentioned: OpenClaw
Competitors
Other products that read as similar to this one : 232 launches clear the similarity bar, closest 8 shown.
Attention rank: #180 of 233 (itself plus its competitors, highest first, normalized so YC and Product Hunt are compared fairly).
Launched 128 days after the earliest competitor.
- Context Gateway · hn · 2026-03-13 · 97 upvotes · similarity 0.57
- Context Surgeon · hn · 2026-04-13 · 5 upvotes · similarity 0.57
- Unify memory across agents and improve context rot, written in Rust · hn · 2026-04-05 · 5 upvotes · similarity 0.56
- Breathe-Memory · hn · 2026-03-26 · 6 upvotes · similarity 0.52
- UltraContext · hn · 2026-01-21 · 21 upvotes · similarity 0.51
- Llmbuffer · hn · 2026-06-10 · 7 upvotes · similarity 0.50
- OpenSkills · hn · 2026-01-22 · 9 upvotes · similarity 0.46
- ChatIndex · hn · 2025-11-26 · 17 upvotes · similarity 0.46
The niche, labels, vibe code rating and competitor comparison on this page are analysis by Nicheloom. If you use them, please credit nicheloom.com. How you may use our data.