Problem
gstack skills (especially /plan-eng-review) warn about context running low even when context usage is only ~27%. On a 1M context window (Claude Opus 4.6), 27% means ~730K tokens remaining — far from any real constraint.
Root Cause
The prompt in plan-eng-review/SKILL.md:307 contains:
"If you are running low on context or the user asks you to compress: Step 0 > Test diagram > Opinionated recommendations > Everything else."
This instruction makes the model context-anxious regardless of actual available space. The model doesn't have precise token-counting ability — it relies on heuristics like conversation length. When the prompt explicitly mentions context management, the model becomes overly cautious and starts warning/compressing prematurely.
This was likely calibrated for 200K context windows. On 1M models, the thresholds are completely wrong:
| Context Used |
200K remaining |
1M remaining |
Should warn? |
| 27% |
~146K |
~730K |
200K: maybe. 1M: absolutely not |
| 50% |
~100K |
~500K |
200K: yes. 1M: no |
| 80% |
~40K |
~200K |
Both: yes |
Suggested Fix
Make context management context-window-aware. Options:
-
Detect model context size — Check if the model has extended context (1M) and adjust thresholds accordingly. Could use a gstack-config setting like context_window: 1m.
-
Remove the proactive instruction — Instead of telling the model to watch for low context, only react when Claude Code's own compaction system triggers. The system already handles this automatically.
-
Add a user config — gstack-config set context_warning off to let users opt out of context management hints in the prompt.
Environment
- gstack v0.11.19.0
- Claude Opus 4.6 (1M context)
- Skills affected: at least
plan-eng-review, likely others with similar instructions
Problem
gstack skills (especially
/plan-eng-review) warn about context running low even when context usage is only ~27%. On a 1M context window (Claude Opus 4.6), 27% means ~730K tokens remaining — far from any real constraint.Root Cause
The prompt in
plan-eng-review/SKILL.md:307contains:This instruction makes the model context-anxious regardless of actual available space. The model doesn't have precise token-counting ability — it relies on heuristics like conversation length. When the prompt explicitly mentions context management, the model becomes overly cautious and starts warning/compressing prematurely.
This was likely calibrated for 200K context windows. On 1M models, the thresholds are completely wrong:
Suggested Fix
Make context management context-window-aware. Options:
Detect model context size — Check if the model has extended context (1M) and adjust thresholds accordingly. Could use a
gstack-configsetting likecontext_window: 1m.Remove the proactive instruction — Instead of telling the model to watch for low context, only react when Claude Code's own compaction system triggers. The system already handles this automatically.
Add a user config —
gstack-config set context_warning offto let users opt out of context management hints in the prompt.Environment
plan-eng-review, likely others with similar instructions