02Context & memoryDeep dive ②

If a job has one right answer, don't ask the AI — ask a command

Three signs a job belongs to a script, not a brain

Published2026-05-31
Read2 min read
TypeField notes
TL;DR

Any job with one determinate right answer — counting, filtering, formatting, extracting by a pattern — belongs to a script, not the AI. Hand it to a command and it's exact, instant, and free of tokens. Save the agent's finite desk for judgment and synthesis, the things only it can do.

You paste two hundred log lines and ask the agent to "count the 500 errors." It reads, thinks for a beat, and replies "around 14." Around. A job with exactly one numeric answer, and you got back a guess — tokens spent to buy something less accurate than grep " 500 " | wc -l.

This is the most commonly misassigned kind of work, and fixing it saves the most. One command counts it exactly, instantly, for zero tokens — and never "around."

01Three signs it's a script's job

1
One right answer

Counts, sums, filters by a clear rule. Exactly one correct result — and a machine produces it more surely than a guess.

2
Done over and over

Work you'll do ten times with ten inputs. Write it once as a script and run it forever — don't retype the request each time.

3
No meaning needed

Reformat, split columns, group by key. Pure data transformation — nobody needs to "understand" what it says.

One of the three signs is nearly enough: hand it to a script. All three, and don't even think about it.

02Don't let "convenient" hide "wasteful"

The trap is that the agent can do these jobs, right inside the open chat — so handing it over feels more convenient than opening a terminal. But "convenient once" hides the real price: tokens every time, a chance of drift every time, and you never end up with a reusable tool — just a string of requests you keep retyping.

A fast way to sort it: ask "does this need understanding, or just computing?" Needs understanding — meaning, intent, context, trade-offs — and it's the AI's job; put it on the desk. Just computes a determinate result from input — and it's a command's job. And every computing job you hand off is a slot on the desk handed back to understanding, the only thing worth an agent's attention.

End of pieceCluster 02 · 3/4
The author

craftagent is the notebook of someone still building — told over coffee, each story wrapped around a lesson paid for in full.