context-management
Rules and strategies for managing agent context window size, avoiding bloat, and preserving signal-to-noise ratio.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Rules and strategies for managing agent context window size, avoiding bloat, and preserving signal-to-noise ratio.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Standard patterns for error handling, retry logic, circuit breakers, and graceful degradation.
Detect and remove contradictions across agent policies before execution.
Multi-step tool workflows via code orchestration to reduce latency, context pollution, and token overhead.
Bind project-specific prompts to local schema and workflow artifacts while keeping the harness core generic and globally reusable.
Operational session protocol for task-scoped leases, reconciliation, checkpoints, inspection, queue promotion, and handoff across long-running work.
Operational session protocol for task-scoped leases, reconciliation, checkpoints, inspection, queue promotion, and handoff across long-running work.
| name | context-management |
| description | Rules and strategies for managing agent context window size, avoiding bloat, and preserving signal-to-noise ratio. |
Prevent context window bloat and maintain a high signal-to-noise ratio during long agent sessions.
grep_search over full file reads when looking for specific patternsprogrammatic-tool-calling skill)head -n 50, tail -n 20)M1-I3) instead of re-describing tasks| Sign | Action |
|---|---|
| Repeating information the agent already stated | Context is too large — summarize and drop old details |
| Tool outputs exceeding 100 lines | Filter before returning |
| Reading 5+ full files without processing | Switch to targeted reads |
| Agent "forgetting" earlier decisions | Checkpoint to file, reference it |
Use simple budgeting rules instead of waiting until the window is already polluted:
| Situation | Practical heuristic |
|---|---|
| Large repo exploration | keep the active working set under ~5 files at once |
| Command output | keep only pass/fail summary plus failing details |
| Multi-phase task | checkpoint after each phase and drop solved details |
| Repeated docs/spec references | reference the file path and section instead of pasting it again |
For long tasks, prefer this loop:
progress.md, plan.md, or a Harness checkpointThat is usually better than carrying the full earlier implementation and test history in active context.
programmatic-tool-calling — use code orchestration to filter intermediate dataplanning-tracking — offload plans to files instead of contextsession-logging — checkpoint progress for context reconstructionharness-lifecycle — use canonical checkpoints and handoffs instead of bloated chat memorynpm test output (hundreds of lines) to context