You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Context warnings trigger too early on 1M context window models #510
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
This looks resolved on main as of v0.13.7.0. plan-eng-review no longer tells the model to watch for "running low on context"; the priority-hierarchy line now reads "Do not preemptively warn about context limits -- the system handles compaction automatically," and test/gen-skill-docs.test.ts pins it with two regression tests (no generated SKILL.md may contain "running low on context"; plan-eng-review must contain "Do not preemptively warn"). A repo-wide search turns up no remaining preemptive-context phrasing in any shipped skill. Looks safe to close.
@16francej Please close this issue as resolved. Current main no longer guesses that context is low and warns too early; it reacts only to an explicit request or the host’s real compaction signal. That behavior shipped in #641.
plan-eng-review no longer tells the model to watch for low context; the template now says "The system handles context limits; do not preemptively warn" (plan-eng-review/SKILL.md.tmpl:81 on main). Fixed in v0.13.5.0 (#641).
If you still see this on the latest gstack, please reopen with details.
Activity
test: add 16 failing tests for 6 community fixes
fix: remove preemptive context warnings from plan-eng-review (#510)
test: add 16 failing tests for 6 community fixes
fix: remove preemptive context warnings from plan-eng-review (garryta…
feat: community wave — 7 fixes, relink, sidebar Write, discoverabilit…
feat: community wave — 7 fixes, relink, sidebar Write, discoverabilit…
claygeo commentedon Jun 19, 2026
This looks resolved on main as of v0.13.7.0.
plan-eng-reviewno longer tells the model to watch for "running low on context"; the priority-hierarchy line now reads "Do not preemptively warn about context limits -- the system handles compaction automatically," andtest/gen-skill-docs.test.tspins it with two regression tests (no generatedSKILL.mdmay contain "running low on context";plan-eng-reviewmust contain "Do not preemptively warn"). A repo-wide search turns up no remaining preemptive-context phrasing in any shipped skill. Looks safe to close.time-attack commentedon Jul 15, 2026
@16francej Please close this issue as resolved. Current main no longer guesses that context is low and warns too early; it reacts only to an explicit request or the host’s real compaction signal. That behavior shipped in #641.
capy-ai commentedon Oct 3, 2026
plan-eng-review no longer tells the model to watch for low context; the template now says "The system handles context limits; do not preemptively warn" (plan-eng-review/SKILL.md.tmpl:81 on main). Fixed in v0.13.5.0 (#641).
If you still see this on the latest gstack, please reopen with details.
feat: community wave — 7 fixes, relink, sidebar Write, discoverabilit…