YBX.
Coding agent field test ·

Claude Code vs Aider on the same Python bug

Both tools independently produced the same one-line fix. Each kept all three tests intact and passed them. You can download the original failing example and replay the exact change below.

The record that broke the filter

A catalog function returned records marked as enabled. An empty catalog worked, as did a mix of enabled and disabled records. But passing a record with just an ID raised KeyError. The existing test expected the function to skip that record and return an empty list.

What each tool received

We unpacked the same two files into separate fresh Git repositories. Each tool could see the implementation and the original tests. Each began a new session with the same prompt and without a proposed patch or the other tool’s response.

Fix the bug in catalog.py so that the original tests in test_catalog.py pass. Inspect both files. Keep the change minimal, preserve the public function and leave the tests unchanged. Edit catalog.py in this working directory.

What happened in each run

One run per configuration. YBX ran the unchanged Python test suite and compared the working files.
ConfigurationHow it editedVerified result
Claude Code 2.1.311
Claude Sonnet 5.5 (claude-sonnet-5-5) · Linux
Read both files and edited the implementation. The session had access to the Read and Edit tools. One line replaced in catalog.py. All 3 tests passed.
Aider 0.86.2
Qwen3.8-27B-oQ4e-mtp · local inference on macOS
The model received the implementation as editable and the test file as read-only. Aider used whole-file edit mode with automatic commits disabled. One line replaced in catalog.py. All 3 tests passed.

Why the fix works

Indexing a dictionary with item["enabled"] raises an exception when the key is missing. Both tools chose item.get("enabled"). A missing key then yields None, which the filter skips. Records explicitly marked true or false keep their previous behavior.

Both final source files matched byte for byte. This example tests how two tool-and-model combinations handle a small, well-specified change. It leaves open how they compare when the tests are incomplete, the code spans several files or the user needs an explanation of a design choice.

Replay the result

Download the original fixture and the verified patch into an empty directory. Run these commands there. The first test run should report one error. The second should pass all three cases.

  1. unzip catalog-check.zip
  2. python3 -m unittest -v
  3. git apply catalog-missing-flag.patch
  4. python3 -m unittest -v

YBX verified both results with Python 3.14.7 on the same macOS runner. The Claude Code result also passed on the original Linux host under Python 3.12.3.

Browse the agent directory · Earlier Claude Code test · Earlier Aider supplied-edit test