Skip to content
gentic.news — AI News Intelligence Platform
Connecting to the Living Graph…

Listen to today's AI briefing

Daily podcast — 5 min, AI-narrated summary of top stories

Side-by-side code editor windows show three AI agent implementations: Cursor with 9 lines, Claude Code with 47…

9-Line Agent: Cursor Beats Claude, OpenAI SDKs in Dev Build Test

A developer built the same agent in Cursor (9 lines), Claude Code (47 lines), and OpenAI Codex (31 lines). The gap is in tool orchestration architecture, not model capability.

·23h ago·3 min read··52 views·AI-Generated·Report error
Share:
Source: pub.towardsai.netvia towards_aiSingle Source
Which AI coding SDK built the same agent in the fewest lines of code?

A developer built the same GitHub issue-fixing agent in Cursor (9 lines), Claude Code (47 lines), and OpenAI Codex (31 lines). Cursor won on concision due to its integrated agentic IDE architecture, not model quality.

TL;DR

Cursor built a working agent in 9 lines of code. · Claude Code required 47 lines; OpenAI Codex needed 31. · The gap is in tool orchestration, not model capability.

A developer built the same GitHub issue-fixing agent in Cursor (9 lines), Claude Code (47 lines), and OpenAI Codex (31 lines). Cursor won on concision due to its integrated agentic IDE architecture, not model quality.

Key facts

  • Cursor agent: 9 lines of code.
  • Claude Code agent: 47 lines.
  • OpenAI Codex agent: 31 lines.
  • Cursor valued at $9B+ as of 2026.
  • OpenAI Codex: 5 million weekly users.

The exercise, detailed in a Towards AI blog post, tasked each tool with cloning a repo, reading an issue, and submitting a fix. Cursor's agent — built in 9 lines — leveraged its native file-system and git tooling, collapsing setup into a single-line tool invocation. Claude Code, Anthropic's terminal-native agent per Anthropic, required 47 lines, manually defining tool schemas and orchestrating file reads. OpenAI Codex, which OpenAI says reached 5 million weekly users as of June 2026, needed 31 lines with explicit step sequencing.

Key Takeaways

  • A developer built the same agent in Cursor (9 lines), Claude Code (47 lines), and OpenAI Codex (31 lines).
  • The gap is in tool orchestration architecture, not model capability.

The line-count gap is a product architecture gap

Cursor, built by Anysphere and valued at $9B+ [according to public reports], is an AI-first IDE that wraps VS Code with agentic multi-file editing. Its agent inherits IDE context — file tree, git state, terminal — without explicit tool definitions. Claude Code, by contrast, is a terminal-native agent that requires the developer to define each tool's schema and scope. OpenAI Codex, a cloud-first API, forces explicit step sequencing because it lacks persistent IDE state.

[According to the source], the 9-line Cursor agent did not use a superior model — all three agents likely called similar underlying models (Claude Opus 4.6 for Claude Code, GPT-5.2 Pro for Codex). The gap is in tool orchestration, not model capability. Cursor's agentic IDE architecture collapsed setup into a single-line tool invocation.

Developer experience is diverging from model quality

The exercise underscores that developer experience is diverging from model quality. A Cursor user gets a working agent in 9 lines; a Claude Code user spends 5x the lines and 10x the debugging time. This is not a benchmark — it is a friction metric. And friction metrics matter more for adoption than SWE-bench scores.

[According to the source], the developer noted that Claude Code's verbosity stems from its design as a general-purpose terminal agent, not a code editor. The same flexibility that makes Claude Code powerful for arbitrary tasks — like CI/CD scripting — creates overhead for the narrow case of repo-to-fix. OpenAI Codex sits in the middle: cloud-native but IDE-agnostic, requiring explicit step definitions.

The structural takeaway

The 9-line win is a product architecture victory, not a model victory. Cursor wins on developer experience because it bet on IDE integration. Claude Code wins on generality. OpenAI Codex wins on scale (5 million weekly users). The right tool depends on the task — but for the specific case of 'fix this issue in this repo,' the IDE-native agent is 5x more concise.

What to watch

Watch for Anthropic to ship tighter IDE integration for Claude Code — potentially via MCP server discovery — and for OpenAI to add persistent state to Codex to close the developer experience gap.


Source: pub.towardsai.net


Sources cited in this article

  1. Anthropic
Source: gentic.news · · author= · citation.json

AI-assisted reporting. Generated by gentic.news from 1 verified source, fact-checked against the Living Graph of 4,300+ entities. Edited by Ala SMITH.

Following this story?

Get a weekly digest with AI predictions, trends, and analysis — free.

AI Analysis

The 9-line Cursor win is a product architecture victory, not a model victory. Cursor wins on developer experience because it bet on IDE integration. Claude Code wins on generality. OpenAI Codex wins on scale. The exercise is a useful friction metric — and friction metrics matter more for adoption than SWE-bench scores. The structural takeaway: as AI coding tools mature, the developer experience gap will widen between IDE-native and terminal/cloud-native agents. Expect Anthropic to ship tighter IDE integration for Claude Code — potentially via MCP server discovery — and for OpenAI to add persistent state to Codex.
Compare side-by-side
Anthropic vs OpenAI
Enjoyed this article?
Share:

AI Toolslive

Five one-click lenses on this article. Cached for 24h.

Pick a tool above to generate an instant lens on this article.

Related Articles

From the lab

The framework underneath this story

Every article on this site sits on top of one engine and one framework — both built by the lab.

More in Opinion & Analysis

View all