Skip to content

fix: remove preemptive context warnings in plan-eng-review#572

Open
claygeo wants to merge 1 commit intogarrytan:mainfrom
claygeo:fix/context-warning-1m-models
Open

fix: remove preemptive context warnings in plan-eng-review#572
claygeo wants to merge 1 commit intogarrytan:mainfrom
claygeo:fix/context-warning-1m-models

Conversation

@claygeo
Copy link
Copy Markdown

@claygeo claygeo commented Mar 27, 2026

Problem

The plan-eng-review skill's priority hierarchy instruction tells the model to watch for low context:

"If you are running low on context..."

This causes premature compression warnings on 1M context window models. At 27% usage on a 1M window, ~730K tokens remain — far from any real constraint. The model doesn't have precise token-counting ability and relies on heuristics, so this instruction makes it "context-anxious" regardless of actual available space.

Context Used 200K remaining 1M remaining Should warn?
27% ~146K ~130K 200K: maybe. 1M: absolutely not
50% ~100K ~500K 200K: yes. 1M: no
80% ~40K ~200K Both: yes

Solution

  • Replace the self-monitoring trigger with system-level and user-initiated triggers only
  • The model now compresses when: (1) the user explicitly asks, or (2) Claude Code's own compaction system fires
  • Explicitly instructs the model not to preemptively warn about context limits

Changes

  • plan-eng-review/SKILL.md.tmpl — Updated priority hierarchy instruction
  • plan-eng-review/SKILL.md — Regenerated from template

Test Plan

  • Run /plan-eng-review on a 1M context model with a long conversation — verify no premature compression warnings
  • Run on a 200K context model — verify compaction still works when system triggers it
  • Verify user can still say "compress" to trigger manual compression

Closes #510

The priority hierarchy instruction tells the model to watch for low
context, which causes premature compression warnings on 1M context
window models (e.g., Claude Opus 4.6). At 27% usage on a 1M window,
~730K tokens remain — nowhere near a real constraint.

The fix:
- Removes "running low on context" trigger (model can't accurately
  gauge this and becomes overly cautious)
- Keeps the user-initiated "asks you to compress" trigger
- Adds system compaction trigger (Claude Code handles this natively)
- Explicitly tells the model not to preemptively warn about limits

This was calibrated for 200K windows. On 1M models, the old thresholds
caused unnecessary anxiety and premature summarization.

Closes garrytan#510
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Context warnings trigger too early on 1M context window models

1 participant