Telling Technology · Learning in public
All episodes
EP.33 — THE FEEDBACK LOOP
A Claude Code workflow, on my phone

My AI bot went quiet mid-job — so I closed the loop

An overnight render died halfway and my Telegram AI said nothing — I only noticed the next morning. I found the root cause, made every background job report back the instant it finishes, then taught the same bot to read my 👍/👎 and send me a weekly report card.

A phone showing a Telegram chat with an AI bot: one message reads 'Done: overnight render' with a green tick, framed by a looping arrow that runs from the bot to a thumbs-up reaction and back.
⌁ never goes quiet · reports back · learns from 👍/👎
It started a job, then vanished for eight hours ↓
01 The problem

It started a job — then went silent for eight hours

I kicked off an overnight video render from my phone: text the bot, it fires the job in the background, I go to bed. In the morning — nothing. No "done", no "failed", no half-file. The render had died mid-way and the bot never said a word. Here's the trap: a Telegram message spins up a short-lived claude -p process just long enough to reply, then exits. Anything it "runs in the background" is tied to that process — so the instant the reply is sent, the job is orphaned and dies untracked. The silence wasn't a bug in the render. It was the whole architecture.

telegram → claude -p (per message)
> render the overnight reel in the background, ping me when it's done
Started the render in the background — I'll message you when it finishes. …reply sent · claude -p exits · background job orphaned · no message ever comes
A Telegram chat that ends on 'Started the render, I'll message you when it's done' — followed by hours of empty silence and no completion message.
no "done" ever came
The bot promised a ping, then the job died with the process that launched it
02 The fix

Detach the job from the messenger — and make it report back itself

The fix is a wrapper: run-detached-notify.ps1. Instead of backgrounding a job inside the throwaway chat process, it launches the command as a fully OS-detached process — no console, independent of whatever shell started it — so it keeps running long after the bot's reply is gone. When the job finishes it makes one direct Telegram API call: Done with the tail of the output, or FAILED with the exit code and the error. No heartbeats, no spam — exactly one message, guaranteed, success or failure. It generalizes the pattern the bot already used for its own /bg replies to wrap any command: renders, Python jobs, batch work.

run-detached-notify.ps1
> run-detached-notify.ps1 -Command 'py build_reel.py' -Label 'overnight render'
Launched detached: overnight render. Independent of this session — I'll send one Telegram message on completion. (success → stdout tail · failure → exit code + stderr tail · full log on disk)
A diagram: a detached process box running independently of the Telegram listener, with a single arrow labelled 'one Bot API call on finish' pointing to a phone showing a 'Done: overnight render' Telegram message.
one message, guaranteed
Detached from the chat process → survives it → notifies on its own
03 The other half of the loop

Now it listens back — a weekly report card from my 👍 and 👎

Reporting back reliably is only half a loop. The other half: the bot now reads the reactions I leave on its messages. A new capture patch logs every 👍, 🔥, ❤️ or 👎 to reactions.jsonl; a weekend job (weekly-feedback-digest.ps1) matches each reaction back to the message it was on, sorts them positive vs negative, and sends me a weekly report card on how its own work landed. The bot that talks to me all week finally finds out what I thought of it.

weekly-feedback-digest.ps1
> weekly-feedback-digest.ps1
This week: 👍 9 positive · 👎 2 negative. Positive: proposal draft, the render-notify fix, morning audit. Negative: two over-long replies. Full breakdown in audits/feedback/.
A Telegram 'weekly feedback' message listing reacted-to bot messages grouped into positive and negative, with counts and the message each reaction was left on.
reactions → report card
Every 👍/👎 on the bot's messages, tallied into a weekly summary
⚠️

The digest is wired, not yet fed

Honest status: the reaction-capture patch went live today, and the listener hasn't been restarted yet — so no real reactions have landed and the first digest is empty until it's armed (reply /restart-listener). It also has a known blind spot I didn't hide: messages sent straight through the Bot API — the very /bg and detached-notify replies from beat 2 — aren't indexed yet, so reactions on those read as message text unavailable. Building in public means shipping the loop and the gaps still in it.

04 The receipts

The closed loop, on four screens

The silent gap that started it, the guaranteed completion message that fixed it, the weekly report card, and the coverage gap I left visible on purpose. Tap any image to enlarge it and read exactly what's on screen.

THE LOOP, CLOSED · REPORTS BACK · LISTENS BACK

An assistant that never goes quiet — and hears what you think

A good assistant does two things a silent one can't: it always tells you how the job went, and it finds out how you felt about the job. One night's dead render exposed both gaps at once. Now every background task reports back on its own — success or failure, guaranteed — and every 👍 and 👎 I leave rolls up into a weekly read on where it's helping and where it's annoying me. That's the loop closed: it talks, and for the first time, it also listens.

A closed-loop diagram: AI bot → runs a detached job → reports Done/Failed → user reacts 👍/👎 → weekly digest → back to the bot, a continuous circle in aurora-teal.
AIOS Telegram bot · detached-notify + weekly reaction digest · shipped 2026-07-08
06 Steal this

Two patterns: never-goes-quiet, and a feedback report card

The method is free. Pattern one: run long jobs as a detached process and fire one notification when they finish — so nothing dies silently. Pattern two: log the reactions people leave on your bot's messages and roll them up into a weekly digest. Works with any chat bot and any long-running job.

script run-detached-notify.ps1 script weekly-feedback-digest.ps1 rule one message, on finish only data reactions.jsonl → report card
the pattern # Launch detached + notify once on finish, so no background job ever dies silently: run-detached-notify.ps1 -Command '<your job>' -Label 'overnight render' # → one Telegram "Done" / "FAILED" on completion

Sanitized scripts are being cleaned up for release. Comment LOOP on the post and the bot DMs you both patterns the moment they're public.

Next episode

Next: every open thread in my life, in one file — closeable from my phone

A plain markdown file that tracks every unfinished thread, and a bot that checks one off when I text close 3 from anywhere. The scrappy text file that beat the fancy dashboard.

A darkened preview of the AIOS Telegram bot, hinting at closing tasks from the phone.
drops soon · follow so you don't miss it