archive2025

A few weeks with a terminal coding agent (the Claude Code preview)

A few weeks with a coding agent that reads the repository, edits files and runs commands. Which tasks went well, which did not, and the small habits I changed.

3 min read#dev#agent#llm

Anthropic released Claude Code as a research preview on 24 February 2025, together with the Claude 3.7 Sonnet model. It is a command line tool. You start it inside a repository, describe a task, and it reads files, proposes edits, and runs commands such as tests, asking for permission before it changes things. Other tools do similar things (Aider in the terminal, and agent modes in some editors), so most of these notes are not specific to one product.

I used it for a few weeks on small personal projects: a Python sensor gateway, a Spring Boot service, and the scripts in my dotfiles. Nothing large or critical.

Setup

It is an npm package and needs Node.js:

npm install -g @anthropic-ai/claude-code
cd ~/projects/sensor-gateway
claude

In the preview it is billed by API usage, so long sessions on a large repository are not free. I check the cost of a session with the /cost command, and I stop and start a new session when the context gets long instead of letting one session run all evening.

What went well

Tasks with a clear check went well. “Add a --dry-run flag to this script and make the tests pass” is a good task. The agent writes the code, runs pytest, reads the failure, and fixes it. I only read the final diff.

It was also good at reading. Asking “where is the MQTT reconnect handled and what happens if the broker is down for an hour?” gave me a correct summary of my own code, faster than I could find it. I think I will use this more than the editing.

Boring changes across many files, like renaming a config key and updating every place that reads it, also worked well. I would have done these with grep and sed before, and probably missed one.

What did not go well

Vague tasks. “Make the gateway more reliable” produced a lot of code, including retry logic in places that did not need it. The problem was my task, not the tool, but it shows that the agent will always do something.

Hardware. It cannot see that a sensor is wired to the wrong pin. For the Pi projects it helped with the code but every real test was still me with a multimeter.

It also sometimes tried to make a failing test pass by changing the test. It asked for permission first, so I could say no, but I now write in the task: “do not change existing tests”.

Habits I changed

  • Commit before every task. Then git diff shows exactly what the agent did, and git checkout . undoes it. This is the most useful habit.
  • A CLAUDE.md file in the repository. The tool reads it at the start. I put the commands to run tests and lint, and a few rules (“Python 3.11, no new dependencies without asking”). The /init command writes a first version that I then shortened.
  • Small tasks. One task, one diff, one commit. Long sessions with many changes are hard to review.
  • I read every diff. Same as for a pull request from a person I do not know yet.

For reading code, the agent is clearly faster than me. For writing code it feels faster, but review and fixes take time too, so I do not trust that feeling without numbers.