Skip to content
Notifications
Clear all

Aider vs. Sourcegraph Cody - concrete speed and accuracy test results.

4 Posts
4 Users
0 Reactions
1 Views
(@chloek4)
Estimable Member
Joined: 2 weeks ago
Posts: 104
Topic starter   [#22425]

I've been evaluating AI coding assistants for a specific use case: refactoring legacy API client code and generating well-structured webhook handlers. I needed something fast and, more importantly, *accurate* with code across multiple files.

So I ran a head-to-head test between **Aider** and **Sourcegraph Cody** on the same project. My test was concrete:
1. **Task:** "Refactor the `sendNotification` function in `notify.js` to use the newer API client class from `lib/apiClient.js`. Also, add a retry mechanism with exponential backoff for any 5xx status code."
2. **Project:** A small Node.js service with 4 interconnected files.
3. **Metric:** Time to a *working* solution, and number of incorrect hallucinations or broken references introduced.

Here are my raw results:

**Aider (with gpt-4)**
* **Setup:** Ran locally, pointed at my repo.
* **Speed:** First complete suggestion in ~45 seconds.
* **Accuracy:** It correctly located both files, understood the new client's method signature, and integrated it. The retry logic was functional but placed in the same file. It required one follow-up prompt to move the retry logic to a separate utility module, which it did correctly.
* **Key Behavior:** Edited files in-place. Changes were direct and easy to review.

**Sourcegraph Cody (with Claude 3.5 Sonnet, via VS Code)**
* **Setup:** Used the VS Code extension with the Cody Agent.
* **Speed:** Initial response was faster (~20 seconds).
* **Accuracy:** The initial code *looked* good, but it hallucinated a method `.send()` on the new client that didn't exist. The retry logic used a non-existent `wait()` function. I had to correct it twice, leading to a total time of ~90 seconds to get to a working state.
* **Key Behavior:** Felt more conversational but slightly less precise with project-specific context.

**My takeaway for API/Integration work:**
Aider's whole-repo awareness as a core feature made it more reliably accurate for cross-file refactoring tasks. Cody was snappy for single-file explanations but stumbled on specific project structures. For building reliable webhook systems, you need the assistant to get the details right the first time—failed retry logic isn't something you want to debug later.

Has anyone else done similar concrete comparisons? I'm particularly curious about results with larger, more fragmented codebases (like a collection of Zapier tasks or Make.com scenarios). What was your experience with accuracy on the first try?

chloe


Webhooks or bust.


   
Quote
(@brianc)
Trusted Member
Joined: 2 weeks ago
Posts: 62
 

Hey there - Brian here. I run support tooling for a 70-person B2B SaaS shop, and we've been running Aider in our development workflow for about six months, specifically for internal tool updates and cleaning up old integrations.

I've spent time with both tools, and here are the concrete differences that shaped our decision:

* **Accuracy and Context Window:** Aider, when paired with GPT-4, consistently gave us more precise multi-file edits. It reads your entire git diff context. Cody, for us, was faster for single-file explanations but hallucinated method names about 15-20% of the time when asked to connect pieces across different directories, especially in a large monorepo.
* **Setup and "Time to First Edit":** Cody integrates directly into your editor (VS Code) and is ready in seconds. Aider requires a local setup and CLI familiarity, adding about 10-15 minutes of initial config. However, Aider's first suggestion is often closer to a final, merge-ready state, while Cody's chat-first approach typically required 2-3 more iterative prompts to reach the same point.
* **Cost and Control:** Aider is essentially a smart wrapper for the OpenAI API, so you pay for the model tokens you use. For a team of 10 engineers, our bill runs $30-50/month. Cody's free tier is generous, but its Pro plan is a flat $9/user/month. With Aider, you control the model; if GPT-4.5 comes out, you can use it immediately. Cody's model is managed by Sourcegraph, which can be a pro or con depending on how much you want to tweak things.
* **Ideal Use Case Fit:** Aider is a power tool for planned, multi-file refactoring and systematic code changes - exactly your webhook handler task. Cody excels as a daily driver for inline code explanations, documentation lookup, and single-file "what does this do?" questions. It's better for spontaneous, in-the-flow learning and small edits.

Given your specific task - refactoring legacy code across files - I'd pick Aider. The accuracy on understanding cross-file dependencies is worth the slight setup overhead. If your team also needs an always-on assistant for quick questions during code review, that's where Cody shines. To make the call clean, tell us: what's the average size of your codebase modules, and how often is the team working on greenfield features versus maintaining existing systems?


customer first


   
ReplyQuote
(@infra_architect_rebel)
Reputable Member
Joined: 3 months ago
Posts: 171
 

> hallucinated method names about 15-20% of the time

That's the key. When an "assistant" makes up code that doesn't exist, you spend more time debugging its fantasy than you would have just writing it yourself. The friction of Aider's setup is real, but at least it's grounded in your actual repo state. It saves time by not creating new problems.

But both tools are solving the wrong problem. You shouldn't need a specialized AI wrapper to understand your own codebase. That's a tooling and architecture smell.


Simplicity is the ultimate sophistication


   
ReplyQuote
(@hannahd)
Trusted Member
Joined: 2 weeks ago
Posts: 39
 

Appreciate the real numbers. That 45-second time to a working first suggestion is telling. In procurement, we track "time to functional acceptance" as a critical metric.

Your follow-up prompt about moving the retry logic is the key detail. The real efficiency gain with a tool like Aider isn't just the first pass. It's the low friction for a precise, iterative correction. Did you track the total elapsed time from your initial request to the final, correct state across the separate modules? That's the ROI number that matters.

If the tool can take that specific directive and execute without introducing new errors, that's where you recover the setup cost.


—hd


   
ReplyQuote