Skip to main content

Effective context management ensures Verdent has the right information at the right time while avoiding performance degradation from context overload.

What You’ll Learn

  • Understanding context windows and their limits
  • Selecting files strategically for optimal context
  • Recognizing and responding to context overload
  • When to reset context for better performance
  • How workspace organization affects context

Understanding Context Windows

Verdent for VS Code’s context window size depends on the model being used.
  • Standard Models (200K)
  • Extended Context (1M)
Most models use standard 200K context windows:
  • Claude 4.5 Sonnet - Balanced for complex tasks
  • Claude 4.5 Haiku - Fast and efficient
  • GPT-5 - Excellent for reasoning (Beta)
  • GPT-5-Codex - Optimized for coding (Beta)
Capacity:
  • ~200,000 tokens of total memory capacity
  • Sufficient for most development tasks and medium-sized projects
What’s Included:
  • All messages in conversation
  • File contents loaded into context
  • Tool outputs and responses
  • System prompts and instructions
  • MCP server definitions
Performance:
  • Degrades significantly when approaching limits
  • Watch for signs of context overload (slower responses, less accurate outputs)
  • Reset context more frequently for optimal performance

Strategic File Selection

Be strategic about file selection to optimize context usage and avoid hitting limits.
Start with fewer files and add more only when needed, Verdent can always read additional files during the conversation.

Use @-Mentions for Explicit Inclusion

@filename.js
Verdent auto-loads related files, but @-mentions ensure exact context. Be selective - only include files directly relevant to the current task.

Monitor Context Usage

  • Watch for performance degradation as sessions grow longer
  • Be aware of conversation length and file count
  • Remove unnecessary files from context when possible

Avoid Context Overload

  • Break large tasks into smaller pieces with fewer files per task
  • Focus on related files only - don’t load entire codebase at once
  • Use MCP server management to disable unused integrations

Best Practices

  • Include only files that need to be modified or referenced
  • Reference existing patterns instead of loading example files
  • For large codebases, work on one module at a time
  • Use project documentation (AGENTS.md) instead of loading many files
  • Avoid the last fifth of the context window for memory-intensive tasks

For Extended Context (1M tokens)

File selection becomes much less critical - you can often load entire project repositories without hitting limits.

Recognizing Context Overload

  • Response Quality
  • Speed Issues
  • Behavioral Changes
  • Technical Indicators
Signs:
  • Less accurate or incomplete responses
  • Missing important details from earlier in conversation
  • Difficulty maintaining consistency across long sessions
  • Confused about recent changes or context
Concrete Examples:
  • Suggests solutions you already rejected earlier in the session
  • Ignores coding conventions you established 20 messages ago
  • Generates code that conflicts with changes made earlier in the conversation
  • Proposes implementations that don’t match your project architecture discussed previously
Primary signal: Verdent’s responses become less accurate or inconsistent
When to Take Action: Performance degradation is your primary signal. If Verdent’s responses become less accurate, slower, or inconsistent - start a fresh session or use context management strategies.
If Verdent’s responses become vague or repetitive, context overload may be occurring. Reset the conversation to restore full performance.
Note: With 1M token context (Claude Sonnet 4.5), these issues are much less common.

When to Reset Context

  • Performance Indicators
  • Task Transitions
  • After Commits
  • Session Management
  • Noticeably slower response times
  • Less accurate or inconsistent responses
  • Verdent forgetting earlier context or patterns
  • Approaching context window limits (watch for degradation signs)
Action: Start fresh session when quality degrades
Best Practice Workflow: Complete atomic unit of work → test → commit → clear context → start fresh for next task. Note: Start a new session to reset context. For 1M token contexts, clearing is needed much less frequently.

Workspace Organization Impact

Workspace organization directly impacts how efficiently context is used and how easily Verdent can navigate your codebase.
  • Well-Organized
  • Poorly Organized
  • Improvement Strategies
Smaller, Focused Files:
  • Many small files consume context more efficiently than few large files
  • Easier to load only relevant modules
  • Better granular control over what’s in context
  • Reduces need to load entire large files
Clear Directory Structure:
  • Logical organization helps Verdent locate related files
  • Feature-based or module-based organization improves context targeting
  • Reduces need to load unrelated code
Documentation in AGENTS.md:
  • Project documentation replaces need to load many example files
  • Architectural patterns described once, referenced repeatedly
  • Coding standards documented centrally
  • Reduces context overhead from exploratory file reads
Benefits:
  • Work on isolated modules without loading entire codebase
  • Clear boundaries enable focused sessions
  • Chunking work becomes natural along module boundaries

Context Optimization Strategies

Effective context optimization combines monitoring, strategic planning, and technical configuration.
  • Monitoring
  • Task Planning
  • File Management
  • Workflow
Watch for Performance Signs:
  • Monitor response quality and speed throughout sessions
  • Notice when responses become slower or less accurate
  • Track conversation length and file count manually
  • Be proactive about starting fresh sessions
What to Monitor:
  • Response accuracy and consistency
  • Time to first response (typing indicator delay)
  • Overall response completion time
  • Memory of earlier conversation details
Subagent Management:
  • Disable unused custom subagents when not needed
  • Each enabled subagent adds definitions to system overhead
  • Keep only actively used subagents enabled
  • Re-enable as needed for specific tasks
Action Threshold: When you notice 2-3 degradation signals, it’s time to start a fresh session.
Monitor response quality as a leading indicator of context health, degraded responses signal it’s time to reset.

FAQs

Standard models (Claude 4.5 Sonnet, Haiku, GPT-5, GPT-5-Codex, MiniMax-M2) have 200K token context windows sufficient for most tasks. Claude Sonnet 4.5 offers extended 1M token context (5x larger) for large codebases with 1000+ files, complex multi-file refactoring, or long development sessions. The 1M context activates automatically when input exceeds 200K tokens or can be explicitly selected.
You must manually start a new session to reset context - Verdent does not automatically clear context. Best practice: reset after completing an atomic unit of work, testing, and committing to version control. For 1M token contexts, resets are needed much less frequently.
There’s no fixed file limit - it depends on file sizes and total token count. For 200K contexts, avoid loading 20+ large files (>1000 lines each). Focus on files directly relevant to your current task. Use @-mentions selectively and leverage AGENTS.md documentation instead of loading many example files. With 1M context, file selection becomes much less critical.
Everything in your session: all messages in the conversation, file contents loaded into context, tool outputs (grep/search results, file reads), system prompts and instructions, and MCP server definitions. Each of these consumes tokens from your total context capacity.
No - resetting context only clears the conversation history and loaded files from memory. Your actual code changes, commits, and file modifications are preserved. Always commit your work to version control before resetting context for safety. Reset → start fresh session → continue working on next task.

See Also