Troubleshooting & Reference
Common issues, migration from legacy formats, YOLO mode safety, and full keyboard shortcut reference.
title: "Troubleshooting & Reference" description: "Common issues, migration from legacy formats, YOLO mode safety, and full keyboard shortcut reference." section: "Full Guide" readTime: "8 min"
Troubleshooting & Reference
Quick fixes for common Cursor issues and a full keyboard shortcut reference.
Migrating Legacy Config
.cursorrules → .cursor/rules/*.md
Old single-file format is deprecated. Split into typed rule files:
Before (.cursorrules):
Always use TypeScript.
Never use any type.
Use Tailwind for styling.
After (.cursor/rules/01-code-style.md):
---
type: rule
alwaysApply: true
---
# Code Style
- Always use TypeScript
- Never use `any` type — use `unknown` and narrow
- Use Tailwind CSS for all styling — no inline stylesSteps:
- Read
.cursorrulescontents - Group by category (style, testing, patterns, etc.)
- Create numbered files:
01-code-style.md,02-testing.md, etc. - Add frontmatter to each:
type: rule,alwaysApply: true/false - Delete
.cursorrules
.mdc → .md
Rename all rule files if using old .mdc extension:
# In your .cursor/rules/ directory
for file in *.mdc; do mv "$file" "${file%.mdc}.md"; doneNo content changes needed — just the extension.
Common Rule Mistakes
| Mistake | Problem | Fix |
|---|---|---|
| Rule for optional workflows | Agent applies it when not needed | Use type: skill instead; call with /skill-name |
Constraints in instructions.md | Instructions are project context, not enforcement rules | Move constraints to .cursor/rules/ with alwaysApply: true |
| One monolithic rule file | Hard to maintain, conflicts | Split by domain: style, tests, security, patterns |
| Rules without examples | Agent interprets loosely | Add concrete before/after code examples in rules |
alwaysApply: true on everything | Performance degradation, context bloat | Only alwaysApply for universal constraints (no any, etc.) |
YOLO Mode Safety
YOLO mode (--dangerously-skip-permissions) runs agent actions without confirmation dialogs. Use it for CI environments, not local dev.
If you must use YOLO locally, set explicit lists:
// .cursor/settings.json
{
"agent": {
"allowedCommands": [
"npm test",
"npm run lint",
"npm run build",
"git status",
"git diff"
],
"deniedCommands": [
"rm -rf",
"git push",
"git push --force",
"npm publish",
"DROP TABLE",
"DELETE FROM"
]
}
}Rule: never run YOLO mode without an allow/deny list. The default is allow-all.
Indexing Issues
Symptom: Responses are slow, @codebase misses files, agent doesn't know about recent changes.
Diagnose: Settings → Indexing & Docs → check indexed file count and last update time.
Fixes:
| Symptom | Fix |
|---|---|
| File count lower than expected | Check .cursorignore — may be excluding too much |
| Index not updating | Re-index: Settings → Indexing → Re-index Repository |
| Large repo slow | Add generated files to .cursorignore (dist/, .next/, node_modules/) |
| Private files in responses | Add to .cursorignore (secrets, personal notes) |
Sample .cursorignore for Next.js:
.next/
node_modules/
dist/
.env*
*.log
coverage/
.turbo/
Context Drift Signs
Your session has drifted when:
- Agent ignores
instructions.mdrules it was following earlier - Suggestions repeat a mistake you already corrected
- Agent proposes patterns that don't match your codebase style
- Responses get shorter/worse over time in the same session
Fix: Reset conversation. Don't try to correct drift with more prompts.
# Start fresh session with:
"Continuing [specific task].
Previous session: [2-3 bullet summary of what was done]
Next step: [exactly one thing]
@relevant-file.ts @instructions.md"
Debugging Workflow Issues
Agent keeps re-implementing already solved things:
- You need the 3-file rule: reference the existing implementation
"Don't re-implement X — it already exists in @src/lib/x.ts. Just use it."
Agent ignores type constraints:
- Make sure
@types/or the relevant type file is in your@mentions - Add
"Use ONLY the types defined in @src/types/ — do NOT invent new types"to your prompt
Generated tests don't test the right behavior:
- Provide the spec or requirements in the prompt explicitly
- Reference an existing test as pattern:
@src/api/orders.test.ts(follow this structure) - Say what behaviors must be covered:
"Must test: success case, validation failure, 404, and 500 error handling"
Composer goes off on tangents:
- Use scoped prompts: one task per session
- End prompts with:
"Do not change anything outside of [specific file/function]."
Keyboard Shortcuts Reference
Core
| Action | Mac | Windows |
|---|---|---|
| Open Composer (full) | Cmd+I | Ctrl+I |
| Open Chat (sidebar) | Cmd+L | Ctrl+L |
| Ask about selection | Cmd+Shift+L | Ctrl+Shift+L |
| Inline edit | Cmd+K | Ctrl+K |
| Accept suggestion | Tab | Tab |
| Reject suggestion | Esc | Esc |
Composer Controls
| Action | Mac | Windows |
|---|---|---|
| Submit prompt | Enter | Enter |
| New line in prompt | Shift+Enter | Shift+Enter |
| @ mention menu | @ | @ |
| Attach file | drag or @file | drag or @file |
| Toggle YOLO mode | Cmd+Shift+Y | Ctrl+Shift+Y |
| Stop generation | Esc | Esc |
Navigation
| Action | Mac | Windows |
|---|---|---|
| Go to definition | F12 | F12 |
| Find in files | Cmd+Shift+F | Ctrl+Shift+F |
| Command palette | Cmd+Shift+P | Ctrl+Shift+P |
| Open terminal | Ctrl+` | Ctrl+` |
| Switch tabs | Cmd+P | Ctrl+P |
Git
| Action | Mac | Windows |
|---|---|---|
| View git diff | Cmd+Shift+G | Ctrl+Shift+G |
| Stage changes | Cmd+Shift+A | Ctrl+Shift+A |
| Commit | Cmd+Enter (in SCM) | Ctrl+Enter |
Quick Reference: File Locations
| File | Purpose | Type |
|---|---|---|
.cursor/rules/*.md | Persistent coding conventions | Rules |
.cursor/rules/skills/*.md | On-demand workflows (/skill-name) | Skills |
instructions.md | Project context for every session | Context |
.cursorignore | Files to exclude from indexing | Config |
.cursor/mcp.json | MCP server configuration | Config |
.cursor/settings.json | Cursor settings override | Config |