Feature Request: Auto-generate context snapshot file when session context is near limit

Resolved 💬 3 comments Opened Mar 18, 2026 by Boxib Closed Mar 22, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

When a long session approaches the context limit, Claude Code starts a new session without meaningful context of what was done. The user has to re-explain
resolved bugs, prior decisions, and pending tasks from scratch. The current auto-compression helps continue a session, but doesn't solve the problem of
restarting a new one with real context — these are two different problems.

Proposed Solution

When a session is approaching the context limit, Claude should automatically create a local file (e.g. .claude/context_snapshot.md) with a structured summary — what was done, pending tasks, key decisions, known bugs and their status. When a new session starts, Claude could read this file to recover meaningful context instead of starting blind.

The implementation seems straightforward — no new infrastructure needed, just a well-timed write to a local file.

This is related to but distinct from #35758 — that request is about auto-compaction, this is about persisting a structured summary to disk for future sessions.

Thanks for considering it.
David Taveira

Alternative Solutions

_No response_

Priority

High - Significant impact on productivity

Feature Category

Interactive mode (TUI)

Use Case Example

_No response_

Additional Context

This idea came up naturally during a real development session with Claude Code. The context reset mid-work and the next session had no knowledge of bugs already resolved, architectural decisions made, or what had been tried and failed. The code itself doesn't capture why things were done — only a structured summary can do that.

The snapshot file would live in the project repo (e.g. .claude/context_snapshot.md), be human-readable, and could also serve as lightweight project documentation between collaborators or across time.

View original on GitHub ↗

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