Note · AI automation
90 days of unattended AI
Two scheduled agents and a bit of Python have posted 90+ daily market briefs to Discord without me. Here's what running an AI pipeline unattended for months actually taught me.
The setup is deliberately unglamorous. Two Claude scheduled agents run on a timer: a morning one writes a pre-market brief on the S&P 500, the Nasdaq, the Mag 7, the macro picture and sentiment; an end-of-day one writes the wrap. Python scripts take what they produce and post it to a Discord channel through a webhook. It has done this every day for more than 90 days — April through June — and the archive of those briefs is the proof. The interesting part isn't the AI writing; it's everything around it that makes "runs every day without me" true instead of aspirational.
The easy 80% and the hard 20%
Getting a good brief out of a capable model once is the easy 80%. Getting brief number 74 posted correctly while you're asleep, on a day the model phrased something oddly or the network hiccuped, is the hard 20% — and it's the only part that matters for something calling itself automation. A demo runs when you're watching. A system runs when you're not. Almost all of the engineering effort went into the gap between those two.
Separate the thinking from the plumbing
The best structural decision was keeping the agent (the part that thinks) cleanly separated from the delivery script (the part that plumbs). The agent's job ends at producing a brief. A small, boring, deterministic Python script owns everything after that: formatting it for Discord, chunking it under the message size limit, hitting the webhook, checking the response. I want the unpredictable component — the language model — to have the smallest possible surface area, and I want the part that talks to the outside world to be the dullest, most testable code I can write. Dull is a feature. You can debug dull at 2am.
Structured output is what makes it deliverable
A wall of free-form prose is hard to post reliably — you can't reason about its shape. Pushing the agents to produce structured briefs — consistent sections for indices, the Mag 7, macro and sentiment — meant the delivery script could format predictably and fail loudly when something was missing, instead of silently posting a malformed message. The more structure you can get out of the model, the more your surrounding code can actually validate rather than hope.
Idempotency, or: never post twice
The failure that erodes trust fastest in a scheduled system isn't a miss — it's a duplicate. A retry that fires after the first attempt actually succeeded, and now the channel has two morning briefs. So the delivery step has to be safe to run more than once: track what's already been posted for a given day and refuse to send it again. Designing every scheduled action to be idempotent — safe to repeat with no extra effect — is the single most important habit for unattended work. Assume everything will run more than once, because eventually it will.
Fail loud, fail visible
When something does break, the worst outcome is silence — the brief simply doesn't appear and you find out days later. The webhook itself is the monitoring channel: because the output lands in Discord, its absence is noticeable, and errors surface in the same place I'd look anyway. You don't need a fancy observability stack for a two-agent pipeline; you need failures to be impossible to miss. A pipeline that fails silently is worse than no pipeline, because it quietly launders your trust.
What actually broke
Over 90+ days the recurring lessons were unsurprising and worth stating plainly:
- The network is not reliable. Webhook calls fail occasionally. Retries with backoff are mandatory — and the moment you add retries, you're back to needing idempotency so the retry can't double-post.
- The model varies at the edges. Occasionally a brief comes out formatted slightly differently. Validating structure before posting, rather than trusting it, catches this before it reaches the channel.
- Message limits are real. Discord caps message length; a long brief has to be chunked. Boring, but it's exactly the kind of detail that turns "works in testing" into "works every day".
- Time is fiddly. Scheduling around market hours, timezones and non-trading days is more error-prone than the AI part ever was.
The real lesson: automate the boring, watch the interesting
The thing I'd tell anyone building agentic automation is that the AI is the least of it. A capable model plus a schedule gets you a demo. Turning that into something that runs for months without you is an exercise in old-fashioned reliability engineering: shrink the unpredictable surface, make the plumbing deterministic and idempotent, validate structure, and make failure loud. The 90+ archived briefs aren't proof that the model is clever — they're proof that the boring parts around it were built to survive the days I wasn't looking.
Need an internal tool that runs without IT approval?
Let's talk — including the kind that quietly runs itself for months.
Get in touch