How aggressive context compression in Cursor taught me to verify what my AI actually sees—and why mksglu/context-mode became non-negotiable in my workflow.
Last month I spent two hours debugging why Cursor kept suggesting a deprecated API—one I'd removed three commits ago. The file was gone. Git history was clean. Yet the AI insisted the old implementation was still valid.
Turns out? Context window compression had silently dropped my recent changes. The model was working with a 6-hour-old snapshot of the codebase.
Cursor (and most AI coding tools) aggressively compress context to fit models' token limits. When your codebase crosses that threshold:
The worst part? No warnings. You just get confident, wrong answers.
I found mksglu/context-mode after the third time I shipped a bug because Cursor's context and my actual codebase had diverged.
It's a dead-simple VSCode extension that shows you exactly what files are in your AI's context window—in real time, with token counts.
# Install
code --install-extension mksglu.context-mode
# Then open Command Palette (Cmd+Shift+P)
# Search: "Context Mode: Show Active Context"
You get a live panel showing:
Before Context Mode:
Me: "Why is the login test failing?"
Cursor: "The test passes locally for me."
[30 min of confusion]
Turns out: test file wasn't in context
After Context Mode:
Context panel shows: auth.test.ts (excluded - token limit)
Me: [adds .cursorrules to prioritize test files]
Cursor: [actually sees the failing assertion]
I now force-include critical files that Cursor's auto-prioritization misses:
# .cursorrules
context:
always_include:
- "**/*.test.ts"
- "**/*.spec.ts"
- "vitest.config.ts"
- "tsconfig.json"
exclude:
- "node_modules/**"
- "dist/**"
- "*.log"
This cut my context size from 52K → 12K tokens while keeping test coverage visible.
I added this to my pre-commit hook:
#!/bin/bash
# .git/hooks/pre-commit
# Check if critical files are in Cursor's context
context_check() {
local file=$1
if ! cursor-context-cli contains "$file"; then
echo "⚠️ $file missing from AI context"
exit 1
fi
}
context_check "vitest.config.ts"
context_check "src/**/*.test.ts"
(Note: cursor-context-cli is a hypothetical wrapper—Context Mode doesn't ship a CLI yet, but the VSCode API makes this trivial to build.)
Context Mode solved visibility, but I'm still wrestling with prioritization:
How do you decide what belongs in context when everything feels critical?
aiThe Dynatrace Cursor plugin brings an MCP server and around thirty skills to your editor to investigate production, and shows how to roll it out to a team.
securityCursor has confirmed a security breach that allowed attackers to distribute a malicious Claude Code...
mcpSeven web search APIs ship an official MCP server you can add to Claude, Claude Code or Cursor:...
aiAgent commands failing with DNS, 403 or read-only errors? Allow the right hosts, cache folders and localhost in Claude Code, Cursor and Codex sandboxes.
securityIf you use Cursor and had the Claude Code extension installed on 29 October 2026, there is a real...
cursorOn November 13, Cursor published the full investigation into a security incident it first disclosed...
Workflows from the Neura Market marketplace related to this Cursor resource