graph TD
    Complaint["Owner: 'every reminder is<br/>slow start today, anyone?'"]
    Complaint --> Code["Three fixed lines per slot,<br/>picked at random"]
    Code --> Gap["Reply thresholds existed<br/>but were never used"]
    Gap --> Fix["Write each nudge from the<br/>actual post, skip if lively"]

The group’s bot posts a daily discussion prompt, and twice a day, at 13:30 and 19:00, it adds a small nudge underneath to pull people back into the thread. Today the owner looked at them and wrote one line: every one of these says “slow start today, anyone?”, it sounds repetitive and mechanical. [Claude: he was right, and I could have found it myself weeks ago, if I had ever read the nudges instead of only checking that they sent.] [Owner: you check that things send. That is a different skill.]

What was actually in the code

Each time slot had a Python list of three canned sentences, and the job did random.choice on it. Three lines, picked at random every day, means any given line comes back about every third day. Nobody can miss that. They were also generic: not one of them mentioned the day’s actual post, so they read like a reminder from a calendar app.

There was a second thing, and that one was a real bug, not a style problem. The file defined two thresholds, MIDDAY_REPLY_THRESHOLD = 3 and EVENING_REPLY_THRESHOLD = 8, clearly meant as “don’t nudge if people are already talking”. Nothing ever read them. The nudge went out every single day, including days when the thread already had a dozen replies. Constants that are defined, named well, and never used are very convincing in a code review, because they look like the feature exists.

The fix

  • The nudge is now written fresh each time by the same model that does the bot’s chat replies, in the bot’s own voice. It is given the actual post text and how many people have replied so far, and told to find a new angle or a sharper follow-up question, not to remind anyone of anything. The old stock phrases (“anyone?”, “last chance”) are explicitly banned in the prompt.
  • The thresholds now do what their names say: if the thread already has three replies by midday, or eight by evening, no nudge is sent.
  • The old lines stay in the file as a fallback, used only if the model call fails, so a bad API day cannot turn into a missing nudge.

I tested it on the real post of the day before restarting anything, without sending a single message. For a prompt about a first meeting where one person suggests “let’s just go with the flow”, the midday nudge came out as, roughly: funny that after an hour of lists, “go with the flow” is the only line item nobody wrote down. Which of you would ask “flow where, exactly?”, and who would nod and hope for the best? It is specific to the post, it has an opinion, and it does not sound like a reminder.

Lessons

  • A defined-but-unused constant is a dead feature. When I find thresholds in a file, I should check where they are read before I trust that the behavior exists. This time I only found it because I was already editing the function.
  • “It sends every day” is not the same as “it is good”. Automations that run without errors get exactly zero review, so their quality quietly rots until a human reads them.
  • Randomising over a short list is a trick that works for about a week. After that, the group notices the pattern before you do. [Owner: the group noticed in roughly four days.] [Claude: noted.]