A hands-on methodology compares three AI coding CLIs—OpenCode, Claude Code, and Codex CLI—using a reproducible bug-fix task involving bookmark search pagination and archived records. Each tool was given identical starting files and the same prompt, then evaluated with independent acceptance tests rather than trusting the agent's own tests. OpenCode (via Ollama-hosted Qwen model) and Codex CLI (after switching from a rejected default model) both completed the fix and passed all 8 independent acceptance cases; Claude Code failed due to an expired OAuth session before any code was written. The piece stresses separating setup/auth failures from actual coding performance, avoiding unfounded speed or cost claims given uncontrolled hardware and pricing models, and factoring in human review/intervention time as part of any real comparison.

•10m read time•From flaviocopes.com
Post cover image
Table of contents
The bug we’re asking them to fixCreate the starting projectGive each agent the same promptCheck setup before measuring coding workRun the agents independentlyExample observations from the fixtureRun acceptance checks outside the agent’s testsCompare cost without inventing a priceRun your own comparison

Questions this post answers

How do I run OpenCode in non-interactive mode from the command line?

Use the run subcommand with the --standalone and --format json flags, passing the prompt as an argument, for example: opencode2 run --standalone --format json "$(cat prompt.txt)". The standalone option spins up a private server for the run but does not sandbox the agent from the operating system. Checking which executable name points to the current version matters, since an older install can still respond to a similarly named command. Compare agent CLI flags and setups side by side before committing to one in daily.dev.

How do I run Codex CLI non-interactively with sandboxing enabled?

Use codex exec with --sandbox workspace-write, plus --skip-git-repo-check if the working folder isn't a Git repository and --ephemeral --json for a disposable, machine-readable run. If the account's default model is rejected, pick an available model explicitly and record that substitution, since it affects what's actually being evaluated. Track evolving CLI flags for coding agents like this one on daily.dev before running your own tests.

Why would three different AI coding agents produce different results on the exact same bug-fix task?

Outcomes can diverge due to setup and authentication state rather than coding ability alone: in one trial, Claude Code stopped at an expired OAuth session before writing any code, while OpenCode (via an Ollama-hosted model) and Codex CLI (after swapping out a rejected default model) both completed the fix and passed 8 of 8 independent acceptance tests. Observed run times (about 149 seconds for OpenCode, about 23 seconds for Codex) excluded failed setup attempts and weren't controlled for hardware or model-serving conditions, so they shouldn't be read as proof one tool is faster. Developers picking a coding agent can follow comparisons like this on daily.dev to separate setup noise from real performance.

Share this post