Feature request: context trim-tail option (preserve recent, drop oldest)

Resolved 💬 3 comments Opened Apr 21, 2026 by sumbhodi Closed May 29, 2026

Feature request: context trim-tail / graceful tail truncation in Claude Code CLI

Problem:
Claude Code's only context management tool is autocompact — a full lossy summarization that factory-resets the session. For collaborative build sessions with a human in the loop, this is brutal.

What gets lost isn't just facts — it's accumulated register: compressed syntax, shorthand, shared context built up over dozens of message pairs. After compaction, the human has to re-explain their entire working style from scratch.

What chat does better:
Claude.ai chat has graceful context management that trims from the tail (drops oldest messages). This preserves the most relevant recent context — the live working state — instead of collapsing everything into a summary.

Request:
A trim-tail option for Claude Code: drop oldest N tokens, preserve recent. Configurable threshold. Let the human choose the tradeoff between depth-of-history and recency.

Why it matters:
In-conversation learning by Claude is truly impressive — its robustness improves with each message pair and is completely reset on compaction. Trim-tail would let that learning survive the session's own length.

Chat has it. Code needs it.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗