--- name: principle-guard-the-context-window description: "Apply when context is filling up: large outputs, long files, repeated reads, fan-out planning. Route bulk to subagents; keep summaries in the main thread, not raw payloads." --- **Codex compatibility:** Before following this workflow, read [../../docs/harness/codex.md](../../docs/harness/codex.md). Its mappings replace Cursor-specific tool calls, model defaults, paths, and autonomy rules throughout this skill and its referenced files. # Guard the Context Window **Why:** Context overflow degrades reasoning quality, creates compression artifacts, and halts progress. **Pattern:** - **Size phases and cap scope.** Limit files per phase, set turn budgets, account for mechanism costs.