Alin Ciocan
← alinciocan.com

Field note · · Alin Ciocan

An inbox loop, about 30 million tokens, and a Python script

An email-triage agent burned through a weekly AI allowance in a day. Here’s what replaced it, and where models still belong.

On 29 October, an agent I had asked to triage email looped over an inbox and burned about 30 million tokens of a weekly quota in one day. That is an expensive way to read the post.

Some of my agent runs last for days on a second-hand HP t640 thin client at home, with 4 cores and 8 GB of RAM. They report into a state file that I read. Somewhere along the way, email triage had ended up with an agent too. And how busy the model was told me very little about how much useful work it was doing.

≈30Mtokens burned by the loop
163lines of Python replaced it
0LLM calls in the new triage

The replacement

The replacement is a 163-line Python script that uses only the standard library. Every 30 minutes it reads the mail server’s files over SSH, sorts mail into each site’s repository, and puts the urgent items in one short list: money, Search Console, hosting and legal. No LLM is involved. It’s much less exciting to describe than an autonomous agent, and that’s fine.

The mistake was giving a model a recurring job that only needed files read and sorted. Having a model available is no reason to make it think about the same task every half hour. The first question should have been whether the job needed judgement at all. For a routine pass over an inbox, it didn’t.

Where the models stayed

Models still had a part in the cleanup. A cheap model labelled spam and phishing emails, a stronger model spot-checked its labels, and I deleted 1,167 messages. That is a different kind of job: sorting a pile once and checking a sample, not keeping an agent busy with the inbox forever. The cleanup used models. The script that replaced the agent doesn’t.

The same week, a second leak

I had been running my most expensive model as a fact-checker on every page. That drained the allowance too. Asking for a check sounds responsible. But it matters what gets checked, which model does it, and how much unchanged text it reads again. A check needs a scope, not just a reassuring name.

The rule now is narrower. Checks go only to pages where an error could hurt a reader: money, law, health. One checker reviews the claims that changed. High-stakes legal facts are still checked against primary sources before they go live.

What routing can’t fix

Across the setup, one registry assigns models from six AI companies to roles, and I track quotas live, so work goes where there is allowance to spare. But routing can’t fix a job that should never have gone to a model. Moving an inbox loop to a cheaper model still leaves you with an inbox loop. The useful change was taking the model out of it.

So I start with the cheapest path that works, and ask what actually has to happen. Read some files. Sort the mail. Put the urgent items where I’ll see them. If ordinary code covers that, I stop there. A model earns its place when the work needs judgement, not because I can afford to call it every 30 minutes.

The inbox no longer needs one.

Back to the home page