Back to Library
Project ContextAdvanced
Manage Context Window Strategically
Long conversations degrade Claude's attention to early context. Use summarization checkpoints to reset while preserving key decisions.
context-windowsummarizationlong-sessions
The Strategy
Context window degradation is real. Periodically summarizing the session state lets you start a fresh conversation without losing decisions—especially critical in long debugging sessions.
prompt.txt
<task>
Summarize everything we've decided so far in this session
so I can start a fresh conversation with full context.
</task>
<output_format>
## Decisions Made
[bullet list of architectural/technical decisions]
## Code Written
[key snippets or function signatures decided on]
## Open Questions
[unresolved items]
## Next Steps
[what we planned to do next]
</output_format>You might also need
Project ContextIntermediate
Feed Context Incrementally
For very large codebases, add files one by one per round-trip rather than dumping everything at once—this reduces noise and token waste.
context-managementincrementaltoken-efficiency
View snippet
Project ContextIntermediate
Provide a Repo Map for Large Codebases
When your codebase is too large to paste, generate a file tree and include it as context so Claude understands your project structure.
repo-mapfile-treearchitecture
View snippet