Fighting Zombies with Sketch

2025-07-09 by David Crawshaw

It is hard from a general description of what a coding agent is to understand how they can help you be more productive programmer. This is an example of how I got value out of an agent today.

Users reported that sketch containers would build up zombie processes. One way to get that from a Go process is to call exec.Start() and not call Wait(). So I grepped through the code for Start() and read the call sites. They were all fine.

I regularly dive into a moderate issue, spend a few minutes on it, and if I do not make any progress, move on. Given my grep had failed, I was going to call it there. Sketch still works with the zombies, it just makes some operational issues for our hosted deployment a bit more annoying. But on a lark I decided to ask sketch to do some more legwork for me.

After a while it came back with an idea. It was wrong.

Its reasoning was what you might expect from a peer when you're pair programming and skimming code: cmd.Wait()'s error is not handled, there's some odd timeout handling in another goroutine. But it doesn't matter, I believe this code will work.

Again I thought I was done, but out of habit I responded to Sketch just the way I would to a human pair programmer.

After this, I forgot about it and was working on another task.

When I found the tab again, Sketch had reached a new conclusion.

That is exactly the problem. Not only that, on reading its summary, it was clear to me that was the problem. I missed it because I grepped for Start() in our codebase, not our dependencies. So I missed the one in the third party pty package. And it looked to me like its solution would work.

At this point I could have said, "great, do it" and would have had a commit. But I wanted to get in there, replicate it for myself, and remove that TERM/sleep/KILL idiom that's unnecessary and so did it by hand.

So that is an example of how an agent made me more productive today. In days past, I would have stopped after my initial grep/read-through failed and gone to another task. Instead sketch gave me some momentum and helped me fix issue #181.

sketch.dev