Every Tuesday I share one tip I picked up from running my own fleet of AI agents. This week’s is about the run that never finishes. Every scheduled agent needs an AI agent timeout, a hard limit that kills the run if it goes too long. It also needs a second thing that most setups forget: a way to tell you when that limit fires.
The receipt: 16 runs killed, 16 left no note
My scheduler has started 1,707 agent runs since June. Each job gets its own time limit, set somewhere between 30 and 90 minutes. The typical run finishes in about 5 minutes. 99% are done inside 40.
16 runs hit the wall and got killed. That’s under 1%. Half of them were the same job, my Reddit research agent, which kept running out of its 40 minutes over the summer. The last one was October 6.
The timeout did its job. Without it, a stuck run could have sat there for hours. With it, each one ended and the next job started on time. That’s the first half of the tip, and it worked.
Then I went looking for those 16 runs’ logs. All 16 are exactly 7 lines long. There’s a header saying the run started, then nothing. No exit code, no result line, no hint about what it was doing when it died. My agents only write their output when they finish, so killing one throws away everything it would have said. The only trace is one ERROR line in the scheduler’s own log, which no alert reads. Nobody got a message. When one of my agents later counted the month’s runs, it filed two of these as “unfinished” and couldn’t say why.

⚡ 取得人工智慧優勢
每週提供真正省時省錢的AI小技巧。沒有廢話,沒有誇大其詞——只有切實有效的方法。.
How to set an AI agent timeout that actually helps
- Base each limit on that job’s real runtime. Look at how long the job usually takes and set the limit at 2 to 3 times its slowest normal run. My daily post usually takes 4 minutes, and its worst run so far was 19, so 60 minutes is plenty. One limit for every job is either too tight for the slow ones or too loose for the quick ones.
- Make the kill loud. The code that kills the run should also send you an alert naming the job and the limit it hit. A timeout that only writes to a log file is a failure nobody named. I already send Telegram alerts for other problems, and timeouts should go through the same channel.
- Leave breadcrumbs as you go. Have the agent write a line to a file at each step (“found 12 posts”, “drafted 3 replies”) instead of saving it all for the end. Then a killed run can still tell you what it already did before you decide whether to re-run it.
The honest part
I haven’t fixed this yet. Today my timeouts are still quiet. I found that out while writing this post, and the alert is now on my to-do list. I also can’t tell you whether those 8 Reddit runs were truly stuck or just slow, because the logs are empty. That’s the whole point. A kill that leaves no evidence leaves you guessing.
要點: give every agent a stopwatch, set from its own history, and wire the stopwatch to your phone. The limit protects your schedule, and the alert tells you it had to step in.
If you’re scheduling agents and you’re not sure what happens when one hangs, 預約策略諮詢 and we’ll check your setup together.
See you next Tuesday.
喬恩

📥 免費:《人工智慧劇本》
我用來經營一人代理公司的所有工具和工作流程。 25 年的行銷經驗濃縮成一份實用指南。免費贈送。.
