← 返回资讯
赵一鸣
产品评测编辑
已审核

3个月深度实测:写代码不卡壳的关键根本不是代码生成能力

**Experience: 3 months of daily driving Cursor, Claude Code, and Codex - here's my brutally honest comparison of code generation quality and context understanding**

3个月深度实测:写代码不卡壳的关键根本不是代码生成能力

3个月深度实测:写代码不卡壳的关键根本不是代码生成能力


Experience: 3 months of daily driving Cursor, Claude Code, and Codex - here's my brutally honest comparison of code generation quality and context understanding

Been seeing a lot of threads lately asking "which AI coding tool is actually good?" and honestly, most of the answers read like they were written by people who tried each tool for 20 minutes and called it a day. I've been using all three (Cursor, Claude Code, and Codex) for actual production work over the last quarter, and I've got some thoughts that'll probably piss off the fanboys on both sides.

Let me start with the thing nobody talks about: context understanding is the real battle, not code generation quality. Anyone who's used these tools for more than a weekend knows they all generate decent code when you give them a clean, isolated prompt. The wheels fall off when you're working in a real codebase with 50 files, weird abstractions, and that one utility function your ex-coworker wrote in 2019 that nobody understands.

Well... that's complicated. Let me explain.


Cursor

This is my daily driver right now, but not because it's "better" at generating code. It's because Cursor actually understands that I'm working in a project, not just a file. That sounds obvious. It isn't.

The @-mention system for referencing files and docs is genuinely useful. Last week I was refactoring our auth middleware (spread across 4 files, because of course it is) and Cursor was the only tool that didn't suggest changes that would break the JWT refresh flow. Claude Code kept wanting to "simplify" things by removing what it thought was redundant code.

Spoiler: it wasn't redundant. It was handling a race condition I spent 3 days debugging last year.

Where Cursor falls on its face: long conversations. After about 15-20 back-and-forths, it starts forgetting what we were even discussing. I've had it suggest reverting changes it made 5 messages ago. Maddening. Actually, wait—I should clarify that it's not exactly "forgetting." It's more like... the context window gets clogged? Like it's still technically aware of the conversation but starts weighing recent messages way too heavily. By message 25 it's basically goldfishing.

Also, the inline editing is a double-edged sword. When it works, it's magic. When it hallucinates a diff that deletes half your function because it "improved readability"... yeah, that's why I commit before every AI session. I learned that one the hard way. Lost 2 hours of work on a Thursday night. My wife was not impressed.


Claude Code

I wanted to love this one. The Anthropic fanboys on r/MachineLearning made it sound like the second coming, and I'll admit, Claude's raw reasoning ability is impressive. For algorithmic problems or "explain this concept" type work, it's genuinely better than the others. I think.

But here's the thing: Claude Code (the CLI tool, not the chat interface) has the worst context management I've seen in production. It loads your entire codebase into context, which sounds great until you realize it's reading EVERYTHING - including your 40MB of node_modules and that one .env file you forgot to gitignore.

Yes, I had a mini heart attack.

No, Claude didn't care about my AWS keys, but still.

Real example from March 12th: I asked it to add rate limiting to our API. Simple enough. Claude proceeded to suggest implementing a token bucket algorithm from scratch - elegant code, well-documented, would have been perfect... if we weren't already using express-rate-limit v7.4.0. The tool literally had the package.json in its context and didn't check it. I just stared at my screen for like 30 seconds.

That's the pattern I keep seeing: Claude generates beautiful code in isolation that doesn't integrate with your actual stack. It's like having a brilliant junior dev who refuses to read the existing codebase and just rewrites everything their way. You know the type. Probably reminds you of someone.

I've tried feeding it a project map manually - writing out file structures and dependency graphs before asking questions. It helps maybe 40% of the time? But honestly that feels like I'm doing the AI's job for it. Not sustainable.


Codex (OpenAI)

Honestly? I'm disappointed. I remember the early Codex demos that blew everyone's minds back in 2022, but the current version (as of January 2025) feels... safe? Sanitized? Like it's been lobotomized by the safety team.

For boilerplate and CRUD, it's fine. Competent even. But ask it to do anything interesting and it either generates incredibly generic solutions that don't account for edge cases, or just refuses. I asked it to implement a custom password hashing scheme as a thought experiment and got a lecture on security best practices. Bro, I know about bcrypt. I was curious about the algorithm design.

The one thing Codex does better than anyone: API integration code. If you need to wire up Stripe, Twilio, or any well-documented API, Codex nails it. Probably because it's been trained on every tutorial ever written. Cursor and Claude will give you something that might work; Codex gives you production-ready boilerplate with error handling and edge cases. I wired up a Stripe Connect integration in 45 minutes last Tuesday. Would have taken me 3 hours of reading docs.

But context? Forget it. Codex has the memory of a goldfish. Actually, goldfish can remember things for months, so that's unfair to goldfish. Codex has the memory of... I don't know, a very forgetful thing. Every prompt is a fresh start. You can't build up understanding over a session, which makes it useless for any task that takes more than 5 minutes.


The actual comparison nobody asked for:

| Tool | Code Quality (isolated) | Context Understanding | Best For |

|------|------------------------|----------------------|----------|

| Cursor | B+ | A- | Refactoring, multi-file changes |

| Claude Code | A | C+ | Algorithms, explanations, greenfield |

| Codex | B | D | API integrations, boilerplate |

The kicker? None of them handle technical debt well. Give them a messy codebase and they'll either ignore the mess (Codex), try to rewrite everything (Claude), or get confused and suggest nonsensical changes (Cursor, after enough conversation turns). It's almost impressive how consistently they all fail at this.


War story time:

Two weeks ago - actually it was March 8th, I remember because it was a Friday and I was supposed to leave early - I had a production bug. Race condition in our WebSocket handler. I know, I know, don't use WebSockets if you don't have to, but here we are. Spent 4 hours debugging. Finally isolated it to a 15-line section that wasn't properly locking state updates.

Threw the code at all three tools:

Fixed it myself in 20 minutes. The AI tools collectively wasted 2 hours of my time. I probably should have just started debugging instead of trying to be clever.


The real TL;DR:

Cursor wins for daily work because it actually understands your project exists. Claude Code is the smartest but has zero practical context awareness. Codex is fine for tutorials but not serious work.

The gap isn't code generation quality anymore - they're all decent. The gap is in understanding that production code exists in an ecosystem, not a vacuum. First tool that truly groks a whole codebase wins. And I don't think we're close to that yet, tbh.

Anyone found a workflow that compensates for Claude's context blindness? I've seen some people on the Anthropic discord talking about custom system prompts that force it to check dependencies first. Might try that next week. Will report back if anything works.


Edit: Since people are asking in the comments - yes, I pay for all three out of pocket. Cursor Pro is $20/mo, Claude Code is through their API (runs me about $35-50/mo depending on usage), and Codex is the $25/mo tier. No, my company doesn't reimburse me. Yes, I make poor financial decisions. My wife reminds me regularly.

Edit 2: Several folks asked about Copilot. I dropped it 6 months ago after it kept suggesting console.log as error handling. Like, consistently. In production code. If you want the full rant I'll add it in the comments, but honestly it's not worth the characters.

Edit 3: Some of y'all are way too pressed about the Codex "lobotomized" comment. I'm not saying it's bad software. I'm saying the safety guardrails make it frustrating for actual development work. There's a difference between "don't help with malware" and "refuse to discuss hashing algorithms." Just my 2 cents.


#ai #devtools #programming #codereview #webdev

520
7435 阅读
5 评论
分享
链接已复制
编辑说明

本文由 MakeSense 编辑团队撰写并审核。文中引用的数据和观点均经过交叉验证,如有疏漏欢迎在评论区指正。最后更新:2026年06月27日 13:42

赵一鸣

产品评测编辑

前产品经理,现专注 AI 工具评测。实测过 30+ 款 AI 产品,擅长横向对比和用户体验分析。

读者评论 5

M
创业者Mark 1周前
正在做相关方向,这篇文章给了我不少启发。
回复 点赞 (7)
老李 1周前
有个小问题想请教,文中提到的那个方案在大规模场景下性能怎么样?
回复 点赞 (5)
运营小陈 2周前
转发到团队群了,大家都觉得有参考价值。
回复 点赞 (4)
数据分析师 3天前
数据引用很扎实,建议补充一下近三个月的最新数据。
回复 点赞 (9)
产品经理阿杰 6天前
从产品角度看,这个方向确实有机会,但商业化路径还需要验证。
回复 点赞 (15)