Help us improve
Share bugs, ideas, or general feedback.
From cc-harness
Use when running long coding sessions that approach context limits - provides strategies for compaction vs context resets, structured handoffs, and managing context anxiety across model versions
npx claudepluginhub jinsong-zhou/cc-harness --plugin cc-harnessHow this skill is triggered — by the user, by Claude, or both
Slash command
/cc-harness:context-managementThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Strategies for maintaining coherence and performance during multi-hour autonomous coding sessions. Based on lessons from building complex applications over 3-6+ hour sessions.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Provides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Guides systematic root-cause debugging via triage checklist for test failures, build breaks, unexpected behavior, logs, and errors.
Share bugs, ideas, or general feedback.
Strategies for maintaining coherence and performance during multi-hour autonomous coding sessions. Based on lessons from building complex applications over 3-6+ hour sessions.
Models lose coherence on lengthy tasks as the context fills. Symptoms:
Some models begin wrapping up work prematurely as they approach what they believe is their context limit. Symptoms:
"Claude Sonnet 4.5 exhibited context anxiety strongly enough that compaction alone wasn't sufficient to enable strong long task performance, so context resets became essential."
What: Summarize earlier conversation in place so the same agent continues on shortened history.
When to use:
Strengths:
Weaknesses:
What: Clear the context window entirely, start a fresh agent with structured handoff.
When to use:
Strengths:
Weaknesses:
| Model | Context Anxiety | Coherence Duration | Recommended Strategy |
|---|---|---|---|
| Sonnet 4.5 | Strong | ~30 min | Context resets essential |
| Opus 4.5 | Minimal | ~1-2 hours | Compaction usually sufficient |
| Opus 4.6 | Minimal | 2+ hours | Compaction sufficient; can run coherently for full builds |
Is the agent showing context anxiety?
├── Yes → Context reset with structured handoff
└── No
├── Is quality degrading? (inconsistencies, forgotten patterns)
│ ├── Yes → Try compaction first, reset if no improvement
│ └── No → Continue, monitor for degradation
└── At a natural breakpoint? (feature complete, phase transition)
├── Yes → Good time for preventive compaction
└── No → Continue
When performing a context reset, write harness/context-handoff.md:
# Context Handoff
## Project State
[What has been built — completed features with status]
- Feature 1: PASS (2 iterations)
- Feature 2: PASS (1 iteration)
- Feature 3: In progress — sprint contract written, not yet implemented
## Current Task
[What the new agent should work on next — be specific]
## Architecture Decisions
[Key decisions that must be preserved — include reasoning]
- Using Zustand for state management — chosen over Redux for simplicity,
all stores in `src/store/`
- API routes prefixed with `/api/v1/` — versioned for future compatibility
- SQLite with WAL mode — single-file DB in `data/app.db`
## File Map
[Key files and their purposes — the new agent needs this to navigate]
- `src/components/Editor.tsx` — Main editor component (canvas + tools)
- `src/components/Sidebar.tsx` — Tool palette and settings panels
- `src/api/routes/` — All FastAPI route modules
- `src/store/editorStore.ts` — Editor state (zoom, tool, selection)
- `SPEC.md` — Product specification (source of truth)
- `harness/` — Harness communication files
## Known Issues
[Problems discovered but not yet fixed]
- Tile palette scrollbar barely visible in dark theme
- Grid overlay flickers during rapid zoom changes
## Conventions Established
[Patterns the new agent must follow for consistency]
- Components: PascalCase, one component per file
- API routes: snake_case, grouped by resource in separate modules
- State: Zustand stores, named `*Store.ts`
- Styling: Tailwind CSS with project-specific color tokens in tailwind.config
- Error handling: try/catch on all API calls, toast notifications for user-facing errors
## Next Steps
1. Implement Feature 3 per the sprint contract in harness/sprint-contract.md
2. After completion, write sprint-result.md for evaluator
3. Remaining features from SPEC.md: Feature 4, Feature 5, Feature 6