An Experienced C Programmer Tries AI Agents

January 7, 2026・7 minute read

I’ve been programming in C for 25 years and have not yet found AI useful for writing code. I use LLMs as a Google replacement, but that’s it. AI autocomplete (aka Cursor) annoyed me because it broke my flow to read every autocomplete suggestion. I don’t need help typing in code, but I wouldn’t mind speeding up project-wide edits and analysis.

In recent months, a new generation of “AI Code agents” debuted that seemed like they had the potential to be useful. Specifically: Claude Code with Opus 4.5 and Codex with gpt-5.2-codex high. Code agents have 3 important traits:

  1. They can read your entire codebase, unlike pasting code in chat
  2. They have shell access, meaning they can compile code, modify files, and use any command deemed necessary (Within the sandbox and limits you specify).
  3. And most importantly to me: They do their work while you work on something else.

So I downloaded Claude Code and started testing…

Is It More Productive?

I performed an experiment to measure the agent’s impact on productivity. For each task I would:

  1. Write the prompt I would give an agent, but not start it
  2. Do the task by myself, measuring how long it took. I wrote the prompt before this step so that the understanding I gain from doing the work doesn’t inadvertently improve the prompt and skew the experiment.
  3. Start the agent on the prompt in a separate copy of the project that doesn’t contain my changes from the last step.
  4. Measure the time it takes me to review its work and edit up to satisfactory quality. I don’t care how long the agent churns because that can happen in parallel while I do other work. I only care how much of my time this workflow consumes.
  5. Compare the times

What I found was that even after reviewing and editing the agent’s code to my standards, AI assistance was usually a net time savings vs doing it by myself. One task involved writing a utf16 string type, writing utf16<->utf8 conversions, auditing of all the existing uses of strings, and reorganizing some other affected types and enums. That took me 4 hours but only 30 minutes with AI assistance. Straightforward but tedious, the ideal scenario for AI.

Regardless of how you feel about AI, I recommend trying this experiment on your own tasks.

Making the Most of Agents

Let me get this out of the way: despite the agents already being better than novice programmers, they’re definitely still worse than great programmers. The other day it wrote a text wrapping function that used an O(n²) algorithm when O(n) used the same amount of memory and required fewer lines. It made the app unbearably slow. In other cases it will just structure new code in sub-optimal ways.

That said, I found that agents don’t need to write new code as well as me to improve productivity. It’s best when treated like an intern or a lawyer’s paralegal: you do big brain planning and give specific instructions, it does tedium in background, you review, tweak, commit.

Random other thoughts:

  1. Even though it doesn’t write the best code when given free reign, it handles feedback well. When I asked it to rewrite the O(n²) algorithm to run in linear time, it did. You need to already be a good programmer to know how the code could be improved. I will tolerate one round of feedback before cutting my losses and making the changes myself. This happened less as I improved at giving direction and learned what tasks it could handle.

  2. It’s useful for analysis. The time consuming part of many bugs is not writing the fix, but figuring out what went wrong. For example, I had one bug where adding 150,000+ items to a set was freezing the app for seconds at a time. The set’s average number of probes per insert was enormous, so my instinct was the cheap hash function I was using was colliding too often. I spent a lot of time trying different hashes but it didn’t seem to be improving. On a whim I asked the agent what it thought might be happening. It agreed with me: the hash function had a degenerate failure case with this data, but more importantly the agent noticed that a recent change to my set data structure was allowing it to get 100% full before resizing, so it’d degrade into linear search of 150,000 items. I wrote the short fix myself and the freeze disappeared.

  3. Helps get over procrastination. Asking an agent to do a task you’ve been putting off makes starting much easier. Best case: it completes the task. Worst case: it gets you over the mental hump and gives a head start on doing it yourself. I experienced this when I needed to create a linux sysroot for cross compilation. It downloaded the headers and static libraries, and even fixed version incompatibilities.

  4. Running one or more agents in the background while I do other work feels like a superpower. This arrangement allows me to focus on doing what I do best while still achieving more per day. You can try this locally by making a copy your project folder for each agent instance and having each one push to its own branch. Alternatively, you can use the web versions of these agents where they work in a Linux VM connected to your Github repo. One benefit of this approach is it never needs to ask for your permission to run a shell command.

Addressing Opposition

A few common refrains that I want to address:

“If the AI writes the code then I won’t understand my codebase.”

First off, You should review everything it does and edit up to your standards.

Secondly, You dictate how you use it, so instead of prompts like “implement this whole feature, k thanks bye”, do things like “replace the entity ID array with a set and update all use sites”. You’ll have a good understanding with that second prompt, even before you look at the changes.

I personally do not ask it to do any work that I don’t know how to do myself. For unfamiliar territory, I use it like a research assistant: “what are my options?” “what are the trade-offs?” “link me to the research paper that introduced that approach”

“But I like programming, I don’t want to be an AI manager”

Typing the code into the editor is the least interesting part of programming. Using AI assistance frees you to focus on the interesting parts: data and algorithm design, feature planning, optimization. You don’t need to give up technical control like the vibecode kooks do. You probably like programming because you like making things, AI can help you make more.

“LLM code exposes you to legal liability”

The fear here is that the AI could add legally protected code to your codebase without license or attribution. Github and the other AI providers have been sued for this, but the case was dismissed. I’m not a lawyer but I do not think this is a concern if you use agents like I do: for specific, surgical changes. If you’re still worried, use agents only for analysis.

“But it’s $20 a month”

At a typical programmer salary, the subscription needs to save you only 30 minutes per month to pay for itself. I achieved that savings in the first week. Ask your employer to pay for it.

How To Get Started

Follow the install instructions for either Claude or Codex. For best results you must change the model to the latest: Opus 4.5 for Claude, gpt-5.2-codex high for Codex. I prefer Claude Code, but it’s a matter of taste. I have no affiliation with either product, but if someone wanted to send credits my way, that’d be cool.

Read More

I’m using the agent while working on my build visualizer

I wrote about how to write generic data structures in C

My most popular article is “Learn Shader Programming with Rick and Morty

Get notified about my next article: