Skip to content
Lex Fridman PodcastLex Fridman Podcast

Cursor Team: Future of Programming with AI | Lex Fridman Podcast #447

Aman Sanger, Arvid Lunnemark, Michael Truell, and Sualeh Asif are creators of Cursor, a popular code editor that specializes in AI-assisted programming. Thank you for listening ❤ Check out our sponsors: https://lexfridman.com/sponsors/ep447-sb See below for timestamps, transcript, and to give feedback, submit questions, contact Lex, etc. *Transcript:* https://lexfridman.com/cursor-team-transcript *CONTACT LEX:* *Feedback* - give feedback to Lex: https://lexfridman.com/survey *AMA* - submit questions, videos or call-in: https://lexfridman.com/ama *Hiring* - join our team: https://lexfridman.com/hiring *Other* - other ways to get in touch: https://lexfridman.com/contact *EPISODE LINKS:* Cursor Website: https://cursor.com Cursor on X: https://x.com/cursor_ai Anysphere Website: https://anysphere.inc/ Aman's X: https://x.com/amanrsanger Aman's Website: https://amansanger.com/ Arvid's X: https://x.com/ArVID220u Arvid's Website: https://arvid.xyz/ Michael's Website: https://mntruell.com/ Michael's LinkedIn: https://bit.ly/3zIDkPN Sualeh's X: https://x.com/sualehasif996 Sualeh's Website: https://sualehasif.me/ *SPONSORS:* To support this podcast, check out our sponsors & get discounts: *Encord:* AI tooling for annotation & data management. Go to https://lexfridman.com/s/encord-ep447-sb *MasterClass:* Online classes from world-class experts. Go to https://lexfridman.com/s/masterclass-ep447-sb *Shopify:* Sell stuff online. Go to https://lexfridman.com/s/shopify-ep447-sb *NetSuite:* Business management software. Go to https://lexfridman.com/s/netsuite-ep447-sb *AG1:* All-in-one daily nutrition drinks. Go to https://lexfridman.com/s/ag1-ep447-sb *OUTLINE:* 0:00 - Introduction 0:59 - Code editor basics 3:09 - GitHub Copilot 10:27 - Cursor 16:54 - Cursor Tab 23:08 - Code diff 31:20 - ML details 36:54 - GPT vs Claude 43:28 - Prompt engineering 50:54 - AI agents 1:04:51 - Running code in background 1:09:31 - Debugging 1:14:58 - Dangerous code 1:26:09 - Branching file systems 1:29:20 - Scaling challenges 1:43:32 - Context 1:48:39 - OpenAI o1 2:00:01 - Synthetic data 2:03:48 - RLHF vs RLAIF 2:05:34 - Fields Medal for AI 2:08:17 - Scaling laws 2:17:06 - The future of programming *PODCAST LINKS:* - Podcast Website: https://lexfridman.com/podcast - Apple Podcasts: https://apple.co/2lwqZIr - Spotify: https://spoti.fi/2nEwCF8 - RSS: https://lexfridman.com/feed/podcast/ - Podcast Playlist: https://www.youtube.com/playlist?list=PLrAXtmErZgOdP_8GztsuKi9nrraNbKKp4 - Clips Channel: https://www.youtube.com/lexclips *SOCIAL LINKS:* - X: https://x.com/lexfridman - Instagram: https://instagram.com/lexfridman - TikTok: https://tiktok.com/@lexfridman - LinkedIn: https://linkedin.com/in/lexfridman - Facebook: https://facebook.com/lexfridman - Patreon: https://patreon.com/lexfridman - Telegram: https://t.me/lexfridman - Reddit: https://reddit.com/r/lexfridman

Lex FridmanhostMichael TruellguestAman SangerguestArvid LunnemarkguestSualeh Asifguest
Oct 6, 20242h 29mWatch on YouTube ↗

CHAPTERS

  1. 0:00 – 3:09

    Why code editors exist: structure, navigation, and “fun” speed

    Lex opens with a deceptively simple question—what’s the point of a code editor—and the Cursor team frames it as a structured, power-enhanced writing environment for code. They emphasize that editors are evolving quickly, and that “fast is fun” is a core product principle.

    • Editors are structured “word processors” with syntax, navigation, and error checking
    • Programming’s appeal is rapid iteration speed: you + computer
    • Fun and responsiveness are treated as first-class UX requirements
    • AI will reshape what a code editor is over the next decade
  2. 3:09 – 5:31

    From Vim → VS Code → Copilot: the first killer LLM coding experience

    The team describes how Copilot’s autocomplete experience was compelling enough to pull longtime Vim users into VS Code. They discuss why Copilot works well even when it’s wrong, and how it served as an early consumer breakthrough for LLMs.

    • Vim users switched primarily to access Copilot (2021)
    • Copilot feels like sentence-completion with a collaborator
    • Low penalty for being wrong: you type one more character and retry
    • Copilot as an early “killer app” for language models
  3. 5:31 – 10:27

    Origin story of Cursor: scaling laws, GPT-4 early access, and a new programming environment

    Cursor’s founding motivation emerges from belief in predictable progress via scaling laws and a step-change in capability with GPT-4. The team realized AI would not remain a point solution in programming, but become central—demanding a new editor rather than a plugin.

    • Scaling laws made AI progress feel predictable and engineerable
    • Early Copilot was magical; early GPT-4 access was a bigger unlock
    • Prior experiments: niche tools (Jupyter/finance), static analysis ideas
    • Conclusion: programming will “flow through” models → need a new environment
  4. 10:27 – 15:39

    Why fork VS Code (not just an extension): control, experimentation, and startup speed

    Lex presses on the competitive angle: why fork VS Code when Copilot exists? The team argues that deep integration and rapid experimentation require editor-level control, and that the opportunity is defined by model capability jumps that unlock new UX repeatedly.

    • Extensions constrain what you can change about the environment
    • Each model jump unlocks new feature classes; being months ahead matters
    • Cursor must make today’s Cursor obsolete within a year
    • Building for themselves: frustration that Copilot’s UX felt stagnant
  5. 15:39 – 19:22

    Cursor Tab as “next action prediction”: from autocomplete to diffs, jumps, and multi-file edits

    They break down Cursor’s core “Tab” philosophy: not just predicting characters, but predicting the next meaningful change—edits, diffs, cursor jumps, even suggested terminal commands. The goal is to eliminate low-entropy actions once user intent is clear.

    • Two Cursor superpowers: shoulder-surfing prediction + instruction-to-code
    • Tab evolves from token completion to “next diff” / “next jump” prediction
    • Goal: remove low-entropy keystrokes; internal metric: ‘how many tabs?’
    • Long-term: jump across files, suggest terminal actions, guide to definitions
  6. 19:22 – 23:09

    Making Tab fast and smart: small models, MoE, speculative edits, and KV caching

    This chapter dives into the engineering required to make Tab low-latency. They explain why the workload is prompt-heavy and generation-light, why sparse MoE models help, and how caching plus ‘speculative edits’ accelerate perceived and real responsiveness.

    • Cursor Tab needs extremely low latency → specialized smaller models
    • Prompt is huge, output is small → MoE/sparse models are a good fit
    • KV cache reuse is critical; prompts must be caching-aware
    • Speculative edits: reuse existing code as draft to process chunks in parallel
  7. 23:09 – 31:23

    Diff UX and the verification problem: reviewing AI edits without drowning

    Cursor’s diff interface is treated as a core innovation: multiple diff modes tuned to context (autocomplete vs large edits vs multi-file changes). The team describes iterative UI experiments and frames the bigger challenge as ‘verification’—helping humans review only what matters.

    • Different diff experiences needed for different edit scales
    • UI iterations: strike-through deletions → option-to-reveal → current side box
    • Verification gets harder as models propose larger changes
    • Ideas: highlight high-information regions, gray out low-entropy parts, model-flag likely bugs
  8. 31:23 – 36:54

    Ensemble modeling in Cursor: custom models for Tab and Apply (diff application)

    Cursor isn’t just a wrapper around frontier models; it’s an ensemble. They explain why ‘Apply’—reliably turning a rough plan into correct file edits—is surprisingly hard for frontier models, motivating custom models that robustly apply changes and reduce token/cost overhead.

    • Cursor uses frontier models + multiple custom-trained specialist models
    • Frontier models struggle with exact diff application (line counts, large files)
    • Approach: big model sketches change; Apply model implements it correctly
    • Benefit: fewer tokens from expensive models; smaller models do execution
  9. 36:54 – 43:28

    Which model is best for coding? Benchmarks vs real-world “VIBE” evaluation

    Asked to compare GPT vs Claude, the team argues no single model dominates across speed, editing, and context. They critique public benchmarks as contaminated and overly well-specified compared to real coding, and describe relying heavily on qualitative internal “vibe checks” plus private evals.

    • No universal winner; trade-offs across speed, editing quality, context
    • They cite Sonnet as ‘net best’ in practice; strong reasoning models differ
    • Benchmarks are unlike real coding: messy intent, underspecified requests
    • Public benchmark contamination makes scores unreliable; use private evals + human qualitative testing
  10. 43:28 – 50:54

    Prompt design and context assembly: Preempt renderer (JSX prompts), ambiguity handling, and file suggestions

    They discuss prompt sensitivity, context window trade-offs, and Cursor’s internal system ‘Preempt’ that renders prompts declaratively using JSX-like components and priorities. They also explore ways to handle user ambiguity—clarifying questions, multiple candidates, and proactively suggesting relevant files to include.

    • More context can slow models and confuse them; relevance bar must be high
    • Preempt: declarative prompt construction/rendering inspired by React/JSX
    • Priorities centered around cursor line; retrieval/reranking can set weights
    • Reducing ambiguity: ask clarifying questions, show multiple generations, suggest files before user hits Enter
  11. 50:54 – 1:10:27

    Agents and background work: Shadow Workspace, LSP feedback loops, and running code safely

    The team is excited about agents but skeptical of ‘agents for everything’ today, emphasizing fast human iteration for most work. They introduce the Shadow Workspace idea: a hidden editor window where models can edit, lint, and iterate using language server feedback, with future extensions toward running code locally or in a sandbox.

    • Agents feel AGI-adjacent but aren’t broadly useful yet; great for well-specified bugs
    • Shadow Workspace: hidden Electron window for background edits without saving
    • Use LSP (types, go-to-def, lint) as feedback signal for model iteration
    • Local vs remote sandbox trade-offs for longer-running, riskier background execution
  12. 1:10:27 – 1:26:09

    Debugging and bug-finding: why models are bad at it, ‘dangerous code’ labeling, and synthetic bug data

    Lex pushes on debugging; the team explains models are poorly calibrated for bug-finding due to pretraining distribution bias toward generation/Q&A. They discuss human paranoia calibration, the idea of labeling dangerous code to focus attention (human and model), and training approaches including synthetic bug injection to create data.

    • Bug-finding is weak even in top models; calibration is poor
    • Pretraining favors code generation and Q&A, not real bug detection workflows
    • Calibration depends on context: experiment code vs production-critical code
    • Training idea: generate synthetic bugs → train a reverse model to detect/fix them; also use traces/debuggers/tools
  13. 1:26:09 – 1:28:32

    Branching everything: databases, file systems, and safe experimentation for agents

    They explore how agents could safely run code and test changes without damaging real systems—especially databases. Branching write-ahead logs (PlanetScale-style) and even branching file systems are discussed as future primitives that make automated experimentation practical.

    • Runtime feedback loops raise safety issues, especially around databases
    • Database branching via WAL branches enables safe testing against realistic data
    • A broader thesis: ‘everything needs branching’ to support agent experimentation
    • Branching can be efficient with clever storage/compute strategies
  14. 1:28:32 – 1:35:46

    Scaling Cursor’s infrastructure: AWS reliability, indexing pipelines, Merkle trees, and embedding caches

    The conversation shifts to operational reality: scaling request volume and codebase indexing. They describe a privacy-aware semantic indexing system that stores embeddings (not code), uses Merkle-tree reconciliation to keep client/server state aligned efficiently, and caches embeddings by chunk hash to avoid recomputation across a company.

    • AWS chosen for reliability even if setup UX is painful
    • Indexing at scale hits unexpected issues (including integer overflows)
    • Merkle tree hashing enables efficient client/server reconciliation
    • Cost bottleneck is embedding computation; cache vectors by chunk hash; store embeddings without storing code
  15. 1:35:46 – 1:47:14

    Local vs cloud models and privacy: performance limits, homomorphic inference, and centralized surveillance risks

    Lex asks why not do more locally; the team argues local compute constraints (especially Windows hardware and huge codebases) make it hard to match cloud capability. They propose homomorphic encryption for inference as a long-term privacy path, and discuss concerns about powerful models driving more sensitive data through centralized providers and monitoring regimes.

    • Local embeddings/models are hard: hardware diversity + massive repos + ANN search costs
    • Frontier capability demands larger models that won’t fit on typical devices
    • Homomorphic encryption could enable cloud-scale inference on encrypted prompts
    • Centralization risks grow with powerful models and prompt monitoring policies
  16. 1:47:14 – 2:08:11

    Frontier training directions: post-training on codebases, synthetic data types, RLHF vs RLAIF, and o1 test-time compute

    They discuss how to make models better at understanding specific repositories (continued pretraining, instruction tuning with synthetic Q&A). Sualeh outlines a taxonomy of synthetic data, compares RLHF and RLAIF, and they analyze o1-style test-time compute, process reward models, tree search, and the decision to hide chain-of-thought.

    • Repo-specialized understanding: continued pretraining + instruction tuning + synthetic Q&A over code
    • Synthetic data taxonomy: distillation; easy-forward/hard-reverse; verifier-filtered rollouts
    • RLHF uses human labels; RLAIF leverages easier verification/ranking than generation
    • o1/test-time compute: open questions on routing, streaming limitations, process reward models, and chain-of-thought hiding (plus distillation concerns)
  17. 2:08:11 – 2:29:04

    Scaling laws and the future of programming: human-in-the-driver’s-seat, higher-bandwidth intent, and abstraction control

    They return to the big picture: scaling laws remain a useful lens but now involve many dimensions (inference compute, context length, architecture). The team argues the future is not a single chatbot textbox, but tools that maximize human agency—letting programmers move up and down abstraction layers, iterate at the speed of judgment, and eliminate low-entropy work while keeping control.

    • Scaling laws evolved: Chinchilla corrections; new axes include inference compute and context length
    • Distillation and inference-budget optimization as major practical levers
    • Programming future: speed + control; not abdication to a Slack-style bot
    • Vision: higher-bandwidth intent injection, fewer low-entropy keystrokes, abstraction-level editing/pseudocode views, and more fun building

Get more out of YouTube videos.

High quality summaries for YouTube videos. Accurate transcripts to search & find moments. Powered by ChatGPT & Claude AI.