Post

Agent Critters

A tiny pixel critter on your Mac's desktop for every Claude Code or Codex session you're running.

Agent Critters

I moved to Ghostty earlier this year but I was a pretty quick convert to Rex once I tried it. I use it to keep an eye on all my coding agents in tabs, and I thought it’d be fun to have something a bit sillier on top of that. So I made some critters.

Every Claude Code or Codex session I have running gets its own little pixel critter that wanders along the bottom of my screen. They sit behind all my windows so I mostly forget they’re there until I glance down. If the agent is working the critter walks around, if it needs me it hops up and down, and if I’ve ignored it for a while it falls asleep. It works without Rex too, it just finds the Claude Code and Codex sessions running on your Mac. If Rex is running though it’ll match each agent up to its Rex tab and use that for extra detail, like the tab’s title, the agent’s status and which Rex session it’s in. It also means agents like Pi and OpenCode running in Rex get critters of their own.

It started with crabs

At first it was just crabs. Then the crabs got different colours and hats, then they’d drop in when an agent started and dig themselves into the ground when it finished. Then I wanted more than crabs, and now there are sea creatures, snacks, a rainbow unicorn and twelve different dogs (I had to have a Maltese at least, since I have two Maltese-Shih Tzus of my own). There’s also a frog that floats in the corner on a balloon when there’s an update.

Meet the critters

Almost everything is configurable. Critters can grow as their agent’s context fills up and shrink back down when it gets compacted, little ones walk faster than big ones, and every so often two of them will have a scuffle if they run into each other. You can also make your own critters if you want, there’s a small editor in the repo for drawing them.

Making them not eat my CPU

I didn’t want a cute toy that quietly chewed through my CPU, but when I checked mine was sitting at around 21%. Not great for some crabs. It turned out it was redrawing everything 30 times a second, including laying out all the label text again every single frame. Now each critter and label is cached and just moved around, it stops animating when nothing is moving or the screen is asleep, and it only checks for new agents every 6 seconds unless something changes.

That got it down to about 1-1.5% CPU with 16-20 critters walking around, still at 30 fps. Memory halved as well, from 39 MB to about 20 MB.

Try it out

It needs macOS 14 or later. The easiest way to install it is to paste this into Claude Code or Codex and let it do the rest:

1
Set up Agent Critters for me by following https://raw.githubusercontent.com/jamesbrooks/agent-critters/main/SETUP.md

The code is on GitHub at jamesbrooks/agent-critters, and the Agent Critters site has all the critters and settings with live demos.

This post is licensed under CC BY 4.0 by the author.