[FEATURE] Cap context usage per turn

Resolved 💬 2 comments Opened Jan 8, 2026 by stoksc Closed Feb 8, 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

Often I'll be far into a patch when Claude Code decides to test, lint it, or manually test subsystem we've never touched for the first time. These activities clobber Claude's context and once it happens, I don't know a good way to go back and save the session. I've tried to use skills and subagents but these require manual setup and don't always work, especially when the task is novel.

Proposed Solution

I'd like to be able to set something like max_context_per_turn and if it is exceeded, Claude Code will rewind with a summary of why the rewind happened. I have zero idea if this is technically feasible 🥲.

Alternative Solutions

Subagents, the new forked skills, and regular skills that coach Claude to not do this work OK. But when we hit something novel, usually it goes south. Edit: I guess you can rewind manually, but sometimes a lot of time has passed since I've realized what happened.

Priority

Low - Nice to have

Feature Category

API and model interactions

Use Case Example

I think I've done this already, but if not ask for more.

Additional Context

Hey thanks for reading this, I have no idea what I'm asking for but would be cool to learn more either way. I looked for dupes best I could, sorry if dupe.

View original on GitHub ↗

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