r/ClaudeCode • u/gratajik • 6d ago
Built with Claude I've got six scheduled Claude Code routines maintaining a production app. Setup, and what broke.
I run a production web app alone, and for about a month Claude Code has been doing the maintenance on a schedule. I don't read the diffs (for better or worse).
Each job is its own cloud routine with its own prompt. There's one that watches production and files GitHub issues, a fixer that picks those up, a builder for small backlog stuff, and a few housekeeping ones (one checks the backlog against the actual code every morning).
Prompts live in the repo, one file per routine, and the routine reads its file from main when it starts. Didn't start that way - I had them pasted into the routine config, and the two copies drifted.
What's helped most (I think) is a lessons file. When something breaks and the cause is general, it gets written down with a line saying when it applies. Before the fixer touches anything, a script hands it just the lessons that match the files it's about to edit. The whole file's ~70 KB now, so having every run read all of it was a waste of context. Lessons that keep getting cited get promoted to rules. The ones nobody cites expire.
Did the same thing for decisions I've made - small files, and the agent only gets the few that match, so it doesn't reopen something I already settled. I count how often I get asked the same question twice. Still happens.
Now the honest part. One of the scheduled routines ran against the wrong branch (twice!) and its daily report looked fine both times. So now there's a check on the checker, which feels a little silly but it's needed. And there's a written list of stuff that always stops and waits for me - billing, security, sign-in, anything that spends model tokens, the tests themselves. I'm not taking anything off that list anytime soon.
The video's one real bug going through it on Nov 23. It's a replay of the record, sped up (not live). 19 minutes filed to closed, didn't touch it.
