For coding, Claude and ChatGPT behave like two different kinds of engineer. Given the same brief, the Claude models build, test and rebuild for an hour or more; the models behind ChatGPT write one considered pass and hand it over in ten minutes. Both ship working software. The shooter below shows the difference better than any summary: same prompt, same scripted input, one attempt each.
How do Claude and ChatGPT approach a coding task?
Very differently, and the run logs show it. We ran Claude Opus 5.5 and Claude Fable 5.1 in Claude Code, and GPT-6 Astra and GPT-6.1 Sol in OpenAI's Codex, the agent behind ChatGPT's coding features.
| On the first four briefs | Claude (Opus 5.5, Fable 5.1) | ChatGPT models (Astra, 6.1 Sol) |
|---|---|---|
| Wall time per build | 25 to 150 minutes | 7 to 20 minutes |
| Shell commands per build | 14 to 118 | 10 to 26 |
| Output tokens per build | 106,000 to 285,000 where recorded | 24,000 to 64,000 |
| API-equivalent cost per build | $7.15 to $20.48 | $0.54 to $5.64 |
| Runtime errors in our recordings | 0 | 0 |
The Claude agents spend those extra commands checking their own work in a headless browser. Opus 5.5 issued 37 commands involving a local web server while building its shooter, so it could load and play what it had made.
Which one writes better code?
Claude writes more of it, and more ambitiously. Opus 5.5's shooter is 11 files and 251 KB of source; Fable 5.1's is 9 files and 165 KB; Astra's is 2 files and 63 KB and Sol's 3 files and 65 KB. The Claude builds have more systems in them, such as richer lighting, a minimap and more interface. The GPT builds are tighter and easier to read. If you will maintain the code yourself, the smaller GPT builds are easier to take over; if you want the most features from one prompt, Claude delivers them.

Where does each one fall short?
Claude's weakness is knowing when to stop. Opus 5.5 was still refining its shooter when our 150-minute limit arrived, and its recording ends in a game over at 25 seconds. ChatGPT's weakness is sameness: GPT-6 Astra and GPT-6.1 Sol repeatedly produced near-twin builds, down to matching fonts and headlines on the landing page. Neither pair logged a runtime error, and on the analytics dashboard all four computed identical figures from the data, so correctness was not what separated them.
| Model | Finished | Wall time | Output tokens | Files | Source size | Runtime errors | API-equivalent cost | Attempts |
|---|---|---|---|---|---|---|---|---|
| Claude Opus 5.5 | Yes | 2h 30m | not recorded (stopped at the 150-minute limit) | 11 | 251 KB | 0 | — | 1 |
| Claude Fable 5.1 | Yes | 1h 14m | 239k | 9 | 165 KB | 0 | $20.48 | 2 |
| GPT-6 Astra | Yes | 19m 43s | 64k | 2 | 63 KB | 0 | $5.64 | 1 |
| GPT-6.1 Sol | Yes | 13m 19s | 61k | 3 | 65 KB | 0 | $1.03 | 1 |
So, Claude or ChatGPT for coding?
Claude for the hard, open-ended build you want done right in one go; ChatGPT for fast iterations and anything cost-sensitive. My working rule: if a human would spend a day on it, let Claude Code spend an hour; if a human would spend an hour, let Codex spend ten minutes. Then judge the output, ideally without knowing which is which.
Four shooters, names hidden. Which one would you keep working on?
Take the blind test
Frequently asked questions
Is Claude or ChatGPT better for coding?
Claude is more thorough and ChatGPT is faster and cheaper. On our briefs the Claude models ran their own code dozens of times and shipped larger, more elaborate builds; the GPT models finished complete, working builds in 7 to 25 minutes at a fraction of the cost.
Is Claude Code better than ChatGPT for coding?
Claude Code is an agent that edits files and runs commands, so the fair comparison is with OpenAI's Codex, which does the same and uses the models behind ChatGPT. That is exactly what we compared: identical briefs, each agent with its vendor's top models.
Which writes more code, Claude or ChatGPT?
Claude, by a lot. Claude Opus 5.5's 3D shooter was 11 files and 251 KB of source; GPT-6 Astra's was 2 files and 63 KB. More code is not automatically better code, which is why the builds are there to inspect.
Did either one produce broken code?
No build logged a runtime error during our recordings. The clearest weaknesses were elsewhere: Claude Opus 5.5 did not finish the shooter within our 150-minute limit, and two of the four shooters end in a game over before the scripted input runs out.