Skip to main content
Module 4: Keep it healthy

Keep your own run log, and kill what's dead

Grok Bot keeps only the 20 most recent runs per routine. Have each routine write its own log line, then review weekly and retire the routines that never do anything.

Grok Bot keeps the 20 most recent run records for each routine — no more. On a five-minute schedule, twenty runs is only the last hour and forty minutes. So if a routine misbehaves at 2 a.m. and you look at 9, the evidence is already overwritten. Twenty runs is enough to see "is it working right now"; it is nowhere near enough to answer "what has this routine actually been doing all month."

The fix is cheap, and it uses a fact from Module 3: your Bots share one cloud computer and can write files. So have each routine write its own one-line log every time it runs. Add this to the end of every routine's instructions:

After every run, append one line to routines/log/<name>.csv:
time,result,changed,minutes,needed_approval,note

result is one of: ok, no_change, draft_left, failed
note is under 12 words. Create the file with that header if missing.

Now you have a history that outlives the 20-run window, sitting on the shared computer where any Bot can read it. And that history answers the question that actually saves you money: which routines should I kill?

Run a weekly review over those logs. You're looking for three patterns:

  • Almost always "no_change." A routine that logs "no change" 95–100% of the time isn't monitoring anything — it's a standing fee. Either slow it down hard (daily instead of every five minutes) or delete it. If it's 99% "no change," it's almost certainly a delete.
  • Fails often. A routine that logs "failed" regularly is eroding your trust and spending compute to produce nothing. Pause it, fix it, or retire it — don't let a known-flaky routine keep firing.
  • Nobody reads its output. This is the quiet one. If the only way you'd notice a routine disappeared is that its log stopped growing, then it was never doing a job worth paying for. Kill it.

You can even make the review itself a routine — a weekly job that reads the log folder, tallies each routine's "no_change" and "failed" share, and posts you a short list of candidates to retire. Just hold it to the same rules as everything else in this course: have it recommend, and let you press delete (remember, deletes have no undo). The goal is a small set of routines you trust, each earning its place — not forty routines quietly burning your allowance while you've forgotten they exist.

Try it

Add the log line to one routine you're running or planning. Then define your own kill criteria in one sentence each: at what "no_change" percentage would you delete a routine, at what failure rate would you pause one, and how you'd notice a routine nobody reads.

Stay in the loop

Enjoying the free lessons? Get an email when we publish new courses and updates — no spam, unsubscribe anytime.

Discussion (0)

Ask a question or share what worked for you. Comments are reviewed before they appear.

Log in to join the discussion and ask questions about this lesson.

No comments yet. Be the first to start the discussion!