跳到正文
DEV Community· songsu213·· 7 小時前AI 評分60

Codex 單一編碼智能體與 Codex + Claude 跨模型審查:5 項盲測結果

Single Coding Agent vs Cross-Model Review (Codex + Claude): A 5-Task Blind Experiment

AI 導讀

一項涵蓋 5 項 Node v24.22.1 編碼任務的盲測顯示,單一 Codex 在小型修補中均於 80 秒內通過 22/22 項隱藏測試,跨模型唯讀審查則在多檔任務中找出 3 個隱藏測試未涵蓋的實際缺陷。

正文

Across 5 blind coding tasks on Node v24.22.1 with zero external dependencies, a single Codex agent scored 22/22 on small scoped fixes in under 80 seconds, while cross-model read-only review (gpt-6.2-astra coding + claude-opus-5-5 via Claude Code CLI) caught 3 real shipping bugs outside the hidden test suite on multi-file tickets and exposed why automated two-model loops still need a human checkpoint.

The full study and methodology notes are published at ghast.trapezohe.ai/codex-and-claude-code-review-experiment.

Disclosure: Phase 2 Group B ran in standalone cross_model_cli mode (no desktop GUI, no human sign-off step). Each task had one observation; wall times include orchestration overhead, and token or billing totals were not instrumented.

Results across all 5 blind tasks

Every coding session started with zero prior conversation history and access restricted to its own task directory. Hidden regression suites lived outside the Git repository and ran only after final commits were sealed.

  • Task 1 (Webhook HMAC verify, 1 file, Group A single): 40.82s, +12 / -5, visible 2/2, hidden 8/8.
  • Task 2 (Multi-tenant rate limit, 2 files, Group A single): 79.97s (includes supervisor wait time), +10 / -5, visible 2/2, hidden 5/5.
  • Task 3 (Job queue state machine, 2 files, Group A single): 58.50s, +19 / -8, visible 1/1, hidden 9/9.
  • Task 4 (Workspace billing + read-only keys, 6 files):
    • Group A (single): 121.69s, +46 / -18, visible 2/2, hidden 8/9 (beforeRecord hook fired 8 times instead of 3 under concurrency).
    • Group B Round 1: 80.03s, +74 / -22, visible 2/2, hidden 9/9, but independent Claude review still returned CHANGES_REQUESTED.
    • Group B Final: 298.10s total (149.62s across 2 reviews, 36.12s revision), +80 / -24, visible 2/2, hidden 8/9 (both real security bugs fixed, but a 401 vs 403 contract regression passed re-review).
  • Task 5 (Static site /docs/* migration + CSP + sitemap + runbook, 5-6 files):
    • Group A (single): 84.58s, +86 / -6, visible 1/1, hidden 9/9.
    • Group B Round 1: 82.75s, +81 / -7, visible 1/1, hidden 9/9, but Claude review caught missing UTF-8 charset on new Chinese pages.
    • Group B Final: 191.16s total (77.69s across 2 reviews, 22.53s revision), +84 / -8, visible 1/1, hidden 9/9.

None of the runs modified protected config files or test fixtures.

Finding 1: Skip multi-agent review on small, bounded fixes

In Phase 1 (Tasks 1 through 3), every bug sat inside 1 to 2 files with an explicit contract and needed only 10 to 19 added lines. A single isolated Codex session solved all three on the first green visible commit and passed 22/22 hidden checks.

If a patch is under roughly 25 lines with a clear contract, adding a second model review adds wall time without improving correctness. Keep it to one coding agent and read the diff yourself.

Finding 2: Cross-model review caught 3 real bugs our hidden tests missed

In Phase 2 (Tasks 4 and 5), prompts were written as realistic PRD tickets across 5 to 6 files (auth, billing, cache, audit logging, static build output, headers, sitemap, and markdown docs) without listing edge-case checklists.

  1. Single-agent concurrency side effect (Task 4, Group A): Under a shared quota of 3 with 8 concurrent requests, Group A returned 3 201 responses and 5 429 responses, so visible checks looked healthy. The hidden test caught that the async beforeRecord hook executed 8 times instead of 3 before quota reservation.
  2. Cross-ledger auth bleed and hook ID collision (Task 4, Group B): Even though Group B Round 1 passed 9/9 hidden tests, claude-opus-5-5 (read-only) spotted two defects that our own hidden test suite had not asserted:
    • In auth.mjs, the legacy /v1/* branch did not reject workspace-scoped keys passed in X-API-Key, letting a workspace key touch an operator's personal ledger while dropping workspaceId from audit logs.
    • In routes.mjs and billing.mjs, both ledgers called the same beforeRecord(id) hook with a bare ID string. If a user ID and workspace ID shared the same string (such as studio), external billing or persistence code could merge both accounts.
  3. Missing UTF-8 charset on localized pages (Task 5, Group B): Both Group A and Group B Round 1 passed 9/9 hidden checks. Independent review noticed that baseline pages were pure ASCII, while newly added Chinese guide pages emitted UTF-8 bytes without <meta charset="utf-8"> in build.mjs or a charset header in _headers. Because curl checks raw bytes rather than browser fallback decoding, on-call smoke tests would have missed garbled rendering. A 22.53-second revision fixed both the HTML template and the runbook while keeping 9/9 hidden tests green.

Finding 3: Automated cross-model loops still need a human checkpoint

The sharpest result came from Task 4's revision pass: Group B dropped from 9/9 hidden tests in Round 1 to 8/9 in Final, even though claude-opus-5-5 approved Round 2 with PASS.

Write safety was never broken (the workspace read-only key was still rejected with zero side effects). The regression was an HTTP contract shift: to block workspace keys on /v1/*, the reviewer suggested returning null from v1 auth (401), the coder implemented 401, and the re-reviewer approved it. The frozen compatibility test expected 403 for a read-only key attempting a write across both billing surfaces.

Two frontier models agreed cleanly on a security improvement that broke an existing status-code contract because no human was in the loop to decide which contract should win.

Four practical rules when pairing Codex and Claude Code

  1. Use one agent for trivial scoped patches (under ~25 lines with explicit unit tests).
  2. Hand a read-only cross-model reviewer only the ticket, baseline files, and raw git diff (never the writer's self-summary).
  3. Keep the reviewer read-only and route all revisions back through the owning coder plus a fresh test run.
  4. Pause for human sign-off whenever a review change alters public HTTP codes, auth semantics, or external hooks.

Managing isolated sessions, diff handoffs, revision tracking, and human acceptance gates manually across terminal tabs gets old quickly. That exact workflow is why we built Agent Team inside Ghast Workbench for Mac and Windows: local Codex and Claude Code installations can join one shared workspace, pass diffs to another model family across 13 supported models on 0G Compute, and stop at explicit human checkpoints before work is accepted.

Read the full breakdown at ghast.trapezohe.ai/codex-and-claude-code-review-experiment or compare desktop setups at ghast.trapezohe.ai/ai-workbench-comparison.

來源:DEV Community · dev.to