Table of Contents

Cursor is the fastest-growing AI code editor. Built by Sualeh Asif, Arvid Lunnemark, Aman Sanger, and Michael Truell — four friends who met studying at MIT — it’s the flagship product of Anysphere Inc., founded in 2022. Two years after launch, Cursor crossed $500M in annual revenue, likely the fastest any developer tools company has reached that milestone. Outlets including Pragmatic Engineer and ByteByteGo have covered the engineering in depth. This article distills what’s most useful.

TL;DR

  • Cursor is a fork of VSCode, not an extension — this was the decision that made everything else possible
  • Tab prediction engineering challenge: prediction in tens of milliseconds without disrupting typing flow
  • Agent Mode lesson: tool calls must be trained into the model; prompting alone isn’t reliable enough
  • Routing strategy: not every step needs the biggest model — speed is itself a product feature
  • The only metric that ultimately matters is whether users keep trusting the tool

Design Philosophy

Why Fork VSCode?

Cursor’s first major engineering decision was to fork VSCode rather than build a VS Code extension. The reasoning is clean:

Extension API limitations: extensions can’t deeply change editor-core behavior — you can’t redesign selection mechanics, insert truly inline ghost text, or change the semantics of file switching. The surface area of what you can make AI-native is fundamentally bounded.

The cost of building from scratch: a stable code editor solves thousands of hard problems — Unicode handling, syntax highlighting, LSP integration, cross-platform font rendering. Rebuilding all of that would have consumed years before any AI differentiation was possible.

Their conclusion: our value is not in building a stable editor; it’s in changing how developers program. Forking lets them stand on VSCode’s stability and direct all their engineering energy toward AI integration.

”Changing the Fundamental Act of Programming”

Cursor’s design philosophy isn’t “autocomplete for code.” It’s a redefinition of the engineer-code relationship:

  • You describe intent; AI generates implementation details
  • You set direction and verify; AI iterates
  • Context is a tool you manage, not just a conversation history

Core Concepts

Tab Prediction: Latency Engineering

Cursor Tab is the most recognizable Cursor feature. The engineering challenge:

Speed requirement: prediction must complete in tens of milliseconds — not hundreds. Ghost text that appears with any perceptible lag disrupts the typing rhythm and introduces cognitive friction.

Context amount vs. quality tradeoff: richer context sent to the model produces better predictions, but retrieving and transmitting it takes time. This is a continuously tuned engineering parameter:

  • Too little context → irrelevant suggestions
  • Too much context → latency too high, experience breaks

Custom model training: Cursor trains a dedicated small model for Tab prediction rather than calling a general-purpose large model. The goal is an optimal balance between accuracy and inference speed.

graph LR
    A[User types] --> B[Capture local context]
    B --> C{Latency budget check}
    C -->|Enough time| D[Send rich context]
    C -->|Tight on time| E[Send minimal context]
    D --> F[Tab-dedicated small model]
    E --> F
    F --> G[Ghost text rendered]
    G --> H{User accepts?}
    H -->|Tab| I[Code inserted]
    H -->|Keeps typing| J[Prediction discarded]

Agent Mode: Production Lessons

Cursor’s Agent Mode (formerly Composer) is the most complex engineering piece. Key lessons:

Tool calls must be trained in, not prompted in

Early experiments tried teaching models how to call tools (search, read file, run command) via prompting. The finding: prompting alone isn’t reliable enough for long-running tasks. For editing operations like search-and-replace, small mistakes break the edit, and the model needs to have internalized when and how to invoke tools.

The solution was training on trajectory data showing the model the correct sequence of tool calls for various coding situations.

The pipeline ceiling

Early Cursor used a fixed pipeline: analyze → plan → execute → verify. This worked well for simple tasks but hit a ceiling on tasks requiring dynamic strategy adjustments.

Lesson: pipelines hit ceilings; knowing when you’ve hit one matters more than picking the right architecture upfront.

Speed as a product feature

Not every step needs the largest frontier model. Cursor’s strategy is routing:

  • Simple steps → small fast model (low latency)
  • Complex planning → large model (high accuracy)

Routing smaller steps to fast models made Cursor’s responsiveness a competitive differentiator, not just a performance metric.

Compared to Alternatives

CursorGitHub CopilotCline (VS Code extension)
ArchitectureVSCode forkVS Code extensionVS Code extension
Tab completionCustom-trained modelGPT-4 familyExternal API dependent
Agent modeBuilt-in (in-house)Copilot coding agentBuilt-in (external API)
Custom modelsYesLimitedNo
Customization depthDeepest (UI-level changes)API-boundedAPI-bounded

When Cursor Is and Isn’t the Right Choice

Cursor fits well when:

  • You want deep AI integration as a daily development environment
  • You need an agent to execute multi-step tasks (Agent Mode)
  • You’re latency-sensitive and want Tab prediction to feel instantaneous

Cursor may not fit when:

  • You need tight compatibility with your existing VS Code extension ecosystem (some extensions may behave differently on the fork)
  • Your enterprise environment has strict code-off-device policies (verify Cursor’s privacy mode)
  • You only need basic autocomplete and don’t need agent capabilities

Summary

The most transferable engineering lessons from Cursor aren’t about which model they use or which framework they chose — they’re about the clarity of tradeoffs:

  1. UX requirements came before architecture choices (fork first so you can control latency)
  2. Speed is a feature, not a metric (route steps by complexity)
  3. User trust is the only terminal metric (one bad agent edit can end the relationship)
  4. Offline benchmarks are useful signals; user retention is the real evaluation

From zero to $500M ARR in two years. That trajectory wasn’t just good models — it was a deep understanding of how engineers actually write code, and what it would take to make AI feel like a reliable collaborator rather than a risky tool.

References

Ask this article

Answers come from this article only. Click any prompt below or open the chat at the bottom right.

🇺🇸 English

Cursor is the fastest-growing AI code editor on the planet right now. It's built by four friends — Sualeh Asif, Arvid Lunnemark, Aman Sanger, and Michael Truell — who met while studying at MIT. They founded a company called Anysphere back in 2022, and here's the number that made everyone pay attention: two years after launch, Cursor crossed five hundred million dollars in annual revenue. That's very likely the fastest any developer tools company has ever hit that milestone.

Now, the team has been unusually open about the engineering behind it — folks like Pragmatic Engineer and ByteByteGo have gone deep on this. So today I want to distill the lessons that actually transfer to your own work. And the theme running through all of them is the same: it's not about which model they picked. It's about the clarity of their tradeoffs.

Let's start with the decision that made everything else possible: forking VSCode.

When Cursor got started, they had a fork in the road. They could build a VSCode extension — the normal, sane, low-risk path — or they could fork the entire editor and own the whole thing. They chose to fork. And their reasoning is really clean.

The problem with the extension route is limits. Extensions live inside a sandbox. You can't reach in and redesign how text selection works. You can't insert truly inline ghost text the way you want. You can't change what happens when a user switches files. The editor gives you a fixed set of hooks, and whatever's outside those hooks is simply off the table. So if your whole product idea is to make the editor AI-native down to its bones, an extension caps how far you can go.

But — and this is the honest part — building an editor from scratch is brutal. A stable code editor quietly solves thousands of hard problems. Unicode handling. Syntax highlighting. Talking to language servers. Rendering fonts correctly across Mac, Windows, and Linux. If you rebuild all of that yourself, you'll burn years before you've written a single line of anything AI-related.

So forking was the middle path. Their conclusion was basically: our value is not in building a stable editor — that's a solved problem — our value is in changing how developers actually program. Forking lets you stand on top of VSCode's stability and pour every ounce of your engineering energy into the AI layer.

And that phrase — "changing how developers program" — is worth sitting with, because it's the real design philosophy. Cursor isn't trying to be fancier autocomplete. It's trying to redefine the relationship between an engineer and their code. You describe intent; the AI fills in the implementation details. You set the direction and you verify the result; the AI iterates. And context stops being just your chat history — it becomes a tool you actively manage.

Okay, let's talk about the feature everyone recognizes: Tab prediction. That's the ghost text that appears as you type, guessing your next edit. And the engineering story here is almost entirely about one thing — latency.

Here's the requirement. The prediction has to land in tens of milliseconds. Not hundreds — tens. Because the moment that ghost text shows up with any lag you can feel, it breaks your typing rhythm. It creates this little cognitive stutter where you're waiting on the tool instead of flowing through your code. So speed here isn't a nice-to-have. It's the whole experience.

And that creates a genuine tension, because there's a tradeoff between how much context you send and how good the prediction is. Send the model more of your surrounding code, and the suggestion gets smarter — but gathering and transmitting all that context takes time. Send too little, and you get fast but irrelevant garbage. So this becomes a dial they're constantly tuning: enough context to be useful, never so much that latency blows the budget.

Picture the actual flow. You type a character. Cursor grabs your local context and checks its latency budget — basically asking, "how much time do I have right now?" If there's room, it sends a richer context; if things are tight, it sends a stripped-down version. Either way, that goes to a small model trained specifically for Tab prediction — not some giant general-purpose model, but a dedicated one tuned for the sweet spot between accuracy and raw inference speed. The ghost text renders. And then one of two things happens: you hit Tab and the code drops in, or you just keep typing and the prediction quietly vanishes. That whole loop has to feel instant.

Now for the most complex piece of the puzzle: Agent Mode. This used to be called Composer, and it's the part that can go off and execute multi-step tasks for you — searching, reading files, running commands. The production lessons here are the juiciest.

Lesson number one, and this is a big one: tool calls have to be trained into the model, not just prompted into it. Early on, the team tried the obvious thing — writing prompts that explain to the model how to use its tools. And it kind of worked for short tasks. But for long-running work, prompting alone just wasn't reliable enough. Think about an operation like search-and-replace: one small mistake and the whole edit is broken. The model needs to have genuinely internalized when to reach for a tool and how to use it. So the fix was training on trajectory data — showing the model, over and over, the correct sequence of tool calls for all kinds of coding situations, until that behavior was baked in rather than bolted on.

Lesson number two: pipelines have a ceiling. Early Cursor ran a fixed sequence — analyze, then plan, then execute, then verify. Clean, predictable, and totally fine for simple tasks. But the moment a task needed the strategy to shift mid-flight, that rigid pipeline hit a wall. And the takeaway is subtle: it's not that pipelines are bad. It's that knowing when you've hit the ceiling matters more than trying to pick the perfect architecture on day one.

Lesson number three ties everything back together: speed is a product feature, not just a performance metric. Not every step needs the biggest, smartest frontier model. So Cursor routes. Simple steps go to a small, fast model with low latency. Complex planning goes to a large, accurate model. By sending all the little stuff to fast models, Cursor's overall responsiveness became an actual competitive advantage — something users feel — rather than a number in a dashboard.

So how does this stack up against the alternatives? Compared to GitHub Copilot and Cline — that's the VS Code extension — the biggest difference is architecture. Cursor is a full fork; the other two are extensions living inside VS Code. On completions, Cursor runs its own custom-trained model, Copilot leans on the GPT-4 family, and Cline depends on whatever external API you point it at. All three have some form of agent mode now, but Cursor's is built in-house and native. And the deepest split is customization: because Cursor owns the whole editor, it can change things at the UI level that an extension simply cannot reach. Copilot and Cline are both bounded by the API surface they're given.

So when is Cursor the right call, and when is it not? It fits beautifully if you want deep AI integration as your everyday environment, if you need an agent to run multi-step tasks, and if you're latency-sensitive enough that you want Tab prediction to feel instant. But it might not be your tool if you depend heavily on a specific VS Code extension ecosystem — some extensions behave differently on the fork — or if you're in an enterprise with strict "code never leaves the device" policies, in which case you'll want to carefully check their privacy mode. And honestly, if all you need is basic autocomplete with no agent, it might be more than you need.

Let me leave you with the three things that really stick.

First: user experience drove architecture, not the other way around. They forked the editor specifically so they could control latency — the product requirement came first, and the engineering decision followed from it.

Second: speed is a feature you can ship. Routing steps by complexity — fast models for simple work, big models for hard thinking — turned responsiveness into something users actively love.

And third, the one that matters most: user trust is the only terminal metric. Offline benchmarks are useful signals, sure, but the real evaluation is whether people keep coming back. One bad agent edit — one moment where the tool quietly breaks your code — can end the relationship for good. Zero to five hundred million in two years wasn't just good models. It was a deep understanding of how engineers actually write code, and what it takes to make AI feel like a collaborator you can trust, instead of a gamble you're taking.

🇹🇼 中文

Cursor 團隊前幾天釋出了 Composer 1.5 這個模型,最近他們在一場訪談裡談了背後的思路。這集我想聚焦在其中最有工程參考價值的三件事:為什麼他們要自己訓練模型、RL 能帶來哪些外部工具做不到的能力,還有支撐 RL 訓練的基礎設施到底有多重。內容我盡量貼著訪談本身,不做額外腦補。

先講 Composer 1.5 的定位。Cursor 團隊講得很直白,他們覺得這是目前能用到最好的模型之一,能力大概落在 Sonnet 4.5 跟 Opus 4.5 之間。他們也很誠實地說,還不到 Opus 的程度,畢竟做出好模型本來就很難,但對接下來能持續變好很有信心。而且這個模型,幾乎完全是靠大量、大量的 RL,也就是強化學習訓練出來的。

不過比分數更值得注意的,是他們對「模型該有什麼手感」的看法。他們要的不是那種你按下 enter 就可以去睡覺的模型,而是希望模型又快、用起來又很投入。你丟一個 query 進去,它就用最快的速度把事情做完。注意,速度在這裡不是事後才優化的東西,它本身就是產品體驗的一部分。

那接下來核心問題來了:為什麼要自己訓練模型,而不是直接搭上前沿模型的浪潮?Cursor 的論點是這樣的——當產品跟模型越來越深度整合的時候,你在乎的那些功能,就必須直接做進模型本身。原因很簡單,有些能力如果沒被訓練進模型裡,模型就是用不好那個東西,你在外面包一層 prompt 是補不回來的。

他們舉了兩個很具體的例子。第一個是 grep。以前有些模型連 grep 都用不好,那要怎麼讓模型變得非常擅長 grep?做法就是用 RL 針對這件事去訓練。第二個是 semantic search,也就是語意搜尋。Composer 系列有個經典特點,就是非常擅長用語意搜尋。面對一個超大的 code base,這些模型能在一到三次查詢之內,就找到該去的地方,而不是動用幾十次 grep 慢慢翻。他們認為這類能力只能靠 RL 學會。往前看,他們特別想讓模型擅長的一件事,是大量遞迴的 sub agent,目標是幾乎所有 query 都能在兩到三分鐘內解掉。而要做到這種程度,基本上就非得訓練自己的模型不可。

再來是最硬的一塊,基礎設施。訪談裡問到 RL 的技術細節,團隊說演算法層面不方便多談,但基礎設施這塊反而更有意思。RL 是個新技術,正因為新,當你把規模拉大的時候,基礎設施會變得相當複雜。實際在跑 RL 的時候,你是在同時跑數百萬個 sandbox。

這裡有個很關鍵的產業觀察:做到某個規模之後,你根本沒辦法向任何人「買」這套基礎設施。過去十年成立的軟體公司,大多是這樣運作的——遇到很難的事就外包給供應商,AWS 幫你打點底層,你在上面專心寫好軟體,關注點漂亮地分離。但當你一年要吃掉上億等級的 CPU compute,這種分工就行不通了。你必須自己想清楚,要怎麼把同時運行的數十萬、甚至數百萬個 sandbox 編排起來,餵給 RL 訓練。這已經不是租雲端能解決的問題,而是必須自建的系統。

最後聊一個使用者體驗的設計,模型路由。既然同時有前沿模型、有 Composer 1.5 這麼多選項,使用者到底該選哪個?團隊的目標是——讓你根本不必去想這件事。你面前就只有一個輸入框,按下 enter,剩下的都不用管。背後的邏輯是依難度自動路由:偏簡單的 query,就走一個非常快、低延遲的模型;真的很困難的 query,才交給那個很聰明、高能力的模型。這樣一來,簡單問題得到極快的回應,困難問題交給最強的模型處理,而使用者完全不用為了選模型分心。

最後總結一下。這場訪談沒談營收,也沒談編輯器架構,就聚焦在 Cursor 為什麼要走上自研模型這條路,可以歸納成三點。第一,能力得內建:grep、語意搜尋這類能力要靠 RL 訓練進模型,不是外部 prompt 能補的。第二,RL 是自建工程:數百萬 sandbox、上億等級 CPU compute 的規模,讓外包給供應商的舊模式徹底失效。第三,速度就是產品:模型要快、要讓人願意一直用,再用路由把選模型這件事從使用者身上拿掉。三件事其實指向同一個方向——當你要做到那個程度,模型就不能只是拿來用,它得是你自己造的。

Tags

Related Articles

RAG's Five Stages: From Pipeline to Reasoning Retrieval, and the Naive RAG on My Own Site

Over the past two years RAG evolved from a 'linear pipeline' to 'loop-based reasoning'. It maps cleanly to five stages: Naive, Advanced, Modular, Graph, Agentic. The real inflection point is control moving from pipeline to agent — a System 1 → System 2 shift. Looking back at engineer-news's own RAG stack, it's stuck at the Naive edge — so this post also lays out what to fix next.

Building a Real RAG: 5 Infra Lessons from InfiniFlow's 2024 Year-in-Review

The previous post zoomed out for a five-stage panorama of RAG. This one zooms in on the five infra lessons any real RAG has to face: document ingestion, contextualized chunking, three-lane hybrid search, tensor reranker, and GraphRAG's semantic gap. Each lesson is checked against engineer-news's current stack, ending with a priority list for a personal site.

Harness Engineering (2): Five Engineering Answers from OpenAI's Million-Line Experiment

Three OpenAI engineers, five months, one million lines of AI-generated code, zero hand-written. The real value of this experiment isn't the numbers — it's the proof that Harness design can be engineered. Five concrete practices: making the app legible to agents, treating the repo as the source of truth, mechanizing architectural constraints, rewriting merge philosophy, and background entropy management.