Nicheloom visits: 58,069 all-time · 7,637 in the last 7 days

The opportunity tracker for new startups.

Today: 1,953 launches · Niche of the day: specialized calculation tools · See what launched today →

Context Surgeon

Let AI agents edit their own context window

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.

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 is ephemeral: starts with your CLI session, dies when it ends.The interesting part is that agents naturally start managing their own context without much prompting. In testing, the agent decided on its own to evict old research results before starting an implementation phase.Works with Codex CLI and Claude Code.Install: npm install -g context-surgeon Usage: context-surgeon codex

HN · launched Apr 13, 2026 · 5 upvotes (top 89%) · 0 views

Niche: ai agent memory infrastructure · 350 launches, 11 in the last 7 days ▼ -58% · Explore this niche →

Category and tags

  • Horizontal
  • Agent / copilot
  • Developer
  • AI-native
  • Commercial product

Visit website ↗ Source listing ↗

Could you build this?

Yes Context Surgeon is an MCP server or middleware helper providing tools for agents to edit or prune previous tool call messages in their conversation history, which is straightforward prompt/message-array manipulation.

Discussion

5 comments analyzed.

Feature requests: Automatic state persistence to file between sessions, Project-level configuration folder (like .git) for storing state, Multi-session work support

Competitors

Other products that read as similar to this one : 689 launches clear the similarity bar, closest 8 shown.

Attention rank: #648 of 690 (itself plus its competitors, highest first, normalized so YC and Product Hunt are compared fairly).

Launched 161 days after the earliest competitor.

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.