OVTH / 2026 LIVE · V0.4.0
Ø Overthinking Gateway ↗

Claude Code + Cursor: the dual-driver stack

Cursor for the hour-long flow state. Claude Code for the overnight refactor. One repo, two philosophies, zero context loss between them.

Updated May 08, 2026 by xlrd · Fig. S01

Who this is for

You already pay for one of these tools and wonder if the other is worth it. Or you pay for both and suspect you are only using 30% of each. You work in an IDE most of the day but have at least one recurring task — a migration, a multi-file rename, a dependency bump — that eats an afternoon and deserves to run while you eat lunch.

If you are allergic to cloud models or work on sensitive code, stop here and read 100% local stack: Ollama + Aider + llama.cpp instead.

The split, in one sentence

Cursor owns the cursor. Claude Code owns the branch.

  • Cursor lives in your editor. You type, it autocompletes. You ask in chat, it answers about the open file. You run Composer, it edits three or four files you picked.
  • Claude Code lives in a terminal next to your editor. You give it a goal, it reads the repo, writes a plan, executes, commits, pushes a branch. You review.

Same repo. Different time horizons. Different trust settings.

Tools and versions

  • Cursor 0.50.0+ (the tab model got noticeably smarter in 0.49)
  • Claude Code CLI 1.2.0+ (npm install -g @anthropic-ai/claude-code)
  • Node 20+ for the CLI
  • tmux or a second terminal pane
  • direnv for per-project API keys (optional but recommended)

Setup in five steps

01. Pin the right models in Cursor

Cursor will default to whatever is cheapest. Pin explicit model choices in .cursor/settings.json so chat and Composer behave predictably.

json
{
"cursor.chat.defaultModel": "claude-sonnet-4.5",
"cursor.composer.defaultModel": "claude-opus-4.7",
"cursor.tab.enabled": true,
"cursor.tab.showFullDiff": true,
"cursor.cpp.disabledLanguages": []
}

Sonnet for chat — fast, cheap, right 85% of the time. Opus for Composer — slow, expensive, right for the other 15%.

02. Scope Claude Code with a project config

Drop CLAUDE.md at the repo root. Claude Code reads it before every session. Use it as a brief, not a novel.

markdown
# Project brief

Next.js 15 monorepo. pnpm workspaces.
- web/ — Astro site, do not touch /admin/
- api/ — Fastify, tests in api/test/*.spec.ts
- infra/ — Terraform, ask before changing

## Rules
- Never run migrations without dry-run first
- Commits: conventional, scope = package name
- If a file exceeds 400 lines, propose splitting it before editing

This is where you front-load context. Every minute in the brief saves five in the session.

03. Pin Claude Code to a branch workflow

bash
cd ~/projects/app
git checkout -b refactor/payment-module
claude --dangerously-skip-permissions \
"refactor api/src/payment/* to use Result<T,E> pattern. add tests."

The branch is the boundary. Claude operates freely inside it, you review on the outside. No flag names are forever, check the CLI flags in your installed version if the one above drifted.

04. Wire env vars once, use them everywhere

bash
# ~/.config/direnv/direnvrc-sensitive
export ANTHROPIC_API_KEY="sk-ant-..."
export ANTHROPIC_BASE_URL="https://gateway.ovth.dev/anthropic"  # optional

# In each project root:
echo 'source_up_if_exists ~/.config/direnv/direnvrc-sensitive' > .envrc
direnv allow

Cursor picks it up from your shell. Claude Code does too. One key, two tools, no leakage into commits.

05. Parallelize with tmux

Left pane: Cursor running. Right pane: claude running. Bottom pane: git status and test watcher. Your brain context-switches; your panes do not.

Tradeoffs at a glance

The dual-driver stack is not a philosophy. It is a habit. Once your fingers know which pane to reach for, the decision disappears — and that is the whole win.