# Context Management (/docs/verdent/best-practices/context)

> Managing context effectively for better results



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

### What You'll Learn [#what-youll-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

***

## Understanding Context Windows [#understanding-context-windows]

Verdent's context window size depends on the model being used. Extended context (1M) is handled automatically when needed.

**Available Models:**

| Provider  | Model                  | Context |
| --------- | ---------------------- | ------- |
| Anthropic | claude-opus-4.5        | 200K    |
| Anthropic | claude-sonnet-4.5      | 200K    |
| Anthropic | claude-haiku-4.5       | 200K    |
| Google    | gemini-3-pro-preview   | 1M      |
| Google    | gemini-3-flash-preview | 1M      |
| OpenAI    | gpt-5                  | 272K    |
| OpenAI    | gpt-5-codex (Beta)     | 272K    |
| Zhipu AI  | GLM 4.7                | 200K    |
| Moonshot  | kimi-k2-turbo          | 262K    |

**What's Included in Context:**

* All messages in conversation
* File contents loaded into context
* Tool outputs and responses
* System prompts and instructions

***

## Viewing Context Usage [#viewing-context-usage]

Monitor your current context window usage through the **Context Remaining** indicator in the middle panel. This shows how much context space remains for the current conversation.

**Context Commands:**

| Command    | Description                                            |
| ---------- | ------------------------------------------------------ |
| `/compact` | Compress conversation history to free up context space |
| `/clear`   | Clear conversation and start fresh                     |

<Tip>
  Use `/compact` when context is running low but you want to continue the same task. Use `/clear` or start a new task when switching to unrelated work.
</Tip>

***

## Strategic File Selection [#strategic-file-selection]

Be strategic about file selection to optimize context usage.

<Tip>
  Start with fewer files and add more only when needed. Verdent can always read additional files during the conversation.
</Tip>

<Tabs>
  <Tab title="@-Mentions">
    Use @-mentions for explicit file inclusion:

    ```
    @filename.js
    ```

    Verdent auto-loads related files, but @-mentions ensure precise control. Only include files directly relevant to the current task.
  </Tab>

  <Tab title="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
    * Let Verdent read files as needed rather than preloading
  </Tab>
</Tabs>

***

## Recognizing Context Overload [#recognizing-context-overload]

<Tabs>
  <Tab title="Response Quality">
    **Signs:**

    * Less accurate or incomplete responses
    * Missing important details from earlier in conversation
    * Confused about recent changes or context

    **Action:** Start a fresh task when quality degrades
  </Tab>

  <Tab title="Speed Issues">
    **Signs:**

    * Noticeably slower response times
    * Longer processing delays

    **Action:** Consider starting a new task
  </Tab>

  <Tab title="Behavioral Changes">
    **Signs:**

    * Requests to clarify information already provided
    * Forgetting patterns established earlier
    * Redundant questions about project structure

    **Action:** Reset context by starting a new task
  </Tab>
</Tabs>

<Warning>
  If Verdent's responses become vague or repetitive, context overload may be occurring. Start a new task to restore full performance.
</Warning>

***

## When to Reset Context [#when-to-reset-context]

<Tabs>
  <Tab title="Performance Issues">
    * Noticeably slower response times
    * Less accurate or inconsistent responses
    * Verdent forgetting earlier context

    **Action:** Start fresh task when quality degrades
  </Tab>

  <Tab title="Task Transitions">
    * Switching between unrelated features
    * After completing one task and moving to next
    * After memory-intensive tasks (large refactorings)

    **Action:** New task for new major work
  </Tab>

  <Tab title="After Commits">
    * After committing completed features
    * Between logical checkpoints
    * Following test-verify-commit cycles

    **Action:** Commit → test → new task
  </Tab>
</Tabs>

**Best Practice:** Complete atomic unit of work → test → commit → start fresh task.

***

## See Also [#see-also]

<CardGroup cols="2">
  <Card title="Prompt Engineering" href="/docs/verdent/best-practices/prompts" icon="message">
    Best practices for writing effective prompts
  </Card>

  <Card title="Resource Management" href="/docs/verdent/resource-management/monitoring" icon="chart-line">
    Monitor token usage and credits
  </Card>
</CardGroup>
