Auto-compact not triggering until <10% context remaining

Status Closed — not planned
Maintainer reply None cached
Activity 4 comments · opened Jun 1, 2026 · closed Jul 7, 2026

Summary

Auto-compact failed to trigger in two separate sessions today (2026-05-31), both hitting 10% or less context remaining before the feature activated. In both cases, /compact was run manually to recover.

Steps to reproduce

  1. Run a long session involving heavy tool use (docker logs, large file reads, shell output)
  2. Continue until context is nearly exhausted
  3. Auto-compact does not trigger — context hits ~10% with no automatic compaction

Expected behavior

Auto-compact should trigger well before 10% context remaining, preserving the session.

Actual behavior

Auto-compact did not trigger. Two sessions hit the limit on the same day:

  • Session 1: hit 10%, manually ran /compact
  • Session 2: hit 11% (99% used), manually ran /compact

Context

Both sessions involved significant tool output volume (docker exec, docker logs, large shell commands). It's possible the heuristic underestimates context consumption when tool results are large.

Environment

  • Platform: macOS (darwin 25.5.0)
  • Shell: zsh

View original on GitHub ↗

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