David Gomes, an engineer at Cursor, presents how the team replaced approximately 15,000 lines of TypeScript code powering the Git WorkTrees feature with roughly 200 lines of Markdown-based skills and commands — demonstrating a paradigm shift where product behavior moves from imperative code into LLM-readable prompts.
The original WorkTrees implementation, shipped with Cursor 2.0 in October 2024, enabled parallel agentic coding workflows by letting multiple agents work on isolated Git checkouts simultaneously. The feature included code for creating and managing worktrees, agent isolation enforcement, setup scripts, a "Best of N" judging system (letting users compare results from multiple models on the same task), and cleanup logic for disk management. This totalled around 15,000 lines of code across many files.
The new implementation relies on two existing Cursor primitives: agent skills (Markdown files loaded into context on demand) and subagents (child agents spawned by a parent agent). The /worktree slash command is roughly 200 lines of Markdown instructing the model to create an isolated Git worktree, run any user-configured setup scripts, and stay strictly within that checkout throughout the session. The /best-of-n command is even smaller at ~40 lines, instructing the parent agent to spin up one subagent per specified model (e.g., Kimi, Grok, Composer, GPT-4, Claude Opus), each operating in its own worktree, then wait for all subagents to finish and produce a comparative summary table with qualitative commentary. Notably, Gomes explains these are implemented as server-side commands rather than user-side skills specifically so that prompt improvements can be deployed without requiring users to update their Cursor installation.
The approach yields several clear advantages. Maintenance burden drops dramatically for a power-user feature unlikely to justify heavy engineering investment. Users can now switch into a worktree mid-conversation with a slash command, which was previously impossible. Multi-repo setups (e.g., separate frontend and backend repos) now work correctly — the agent creates one worktree per repo and opens separate PRs. The Best of N judging experience is substantially richer because the parent agent has full context over each subagent's output and can stitch together the best parts from different model implementations.
The main downside is loss of hard enforcement: the previous implementation physically prevented agents from writing outside their assigned worktree at the OS/filesystem level, whereas the new approach relies entirely on prompt instructions. Over long sessions, models — especially smaller ones like Claude Haiku — tend to drift and begin modifying the primary checkout instead. Gomes is building evals using Braintrust to measure two key behaviors: whether the agent performs work inside the worktree (positive scorer) and whether it mistakenly touches the primary checkout (negative scorer). He runs these evals using the headless Cursor CLI. Early results show Haiku deviates frequently, while Composer and Grok perform better. The team plans to incorporate worktree-task scenarios into the RL training pipeline for Composer 3+, sharing behavioral failure patterns with other model providers as well.
Discoverability is also reduced: the old UI surfaced worktrees via a dropdown visible to all users, while the new approach requires knowing the slash command exists. Gomes acknowledges this tradeoff but considers it acceptable given the advanced-user target audience. Looking ahead, Cursor 3.0's redesigned agentic interface will include a more native and complete worktrees implementation. The team is also exploring non-Git parallelization primitives to address worktrees' inherent limitations: slow creation time, high disk usage, and incompatibility with non-Git version control systems.
Hi everyone. How you all doing? Thank you for coming today. I'm going to be talking about how markdown is basically the new code. As Deja has already sort of previewed, we recently replaced a lot of code in the cursor application with just markdown, just a skill. And in today's talk, I'm going to share a bit of the journey of going from a full-blown feature with a lot of code, a lot of dependencies, a lot of complexity and tests into a much more lightweight, streamlined version of the same featu...
Mario Zechner, creator of the LibGDX game framework, delivers a provocative three-act talk about building a minimal codi...