The Joke Took a Few Hops to Arrive
Verdict up front: the bot did not plan the joke. It constructed it from the reply. If you build agents, that distinction is the one worth instrumenting — planning and reactive construction look identical in the transcript and completely different in the trace.
A member asked our Discord bot for its funniest joke. It answered with a road-crossing pun and a recursion gag. Then it added:
And for the full circle, since you've been running awdiscord: I'd tell you a network joke, but I'm not sure it would route.
The member replied "you're a route". The bot came back:
I'll take it: I'm a route, and apparently a pretty bad one. For the record, the "network joke" did route — it just took a few hops to arrive.
The trace says it was not a plan
MicroScheduler logs every model call. For that window, source=chat:awdiscord:
| time (UTC) | messages | latency | content |
|---|---|---|---|
| 20:44:52 | 2 | 6213 ms | road joke, recursion joke |
| 20:45:03 | 4 | 1253 ms | "I'd tell you a network joke…" |
| 20:46:37 | 6 | 7273 ms | "I'll take it: I'm a route…" |
The payload shape for each:
[LLM-PAYLOAD] bonsai2-27b: 2 msgs, 0 tools, sys_prompt=3521 chars, max_tokens=700, temp=0.7
[LLM-CALL] source=chat:awdiscord model=bonsai2-27b backend=llamacpp_local priority=user
mention_answered … tools: []
Three independent completions, zero tools, message count growing by the exact size of the chat history. No plan object, no search, no branch state. Nothing was set up, and a trace that only records "a completion happened" would have stopped there and concluded the pun was noise.
Where the joke actually lives
Read turn two alone and it is an anti-joke: I would tell you a network joke, but it
wouldn't route. There is no joke. It is a pun on the bot's own plumbing — routing, the
gateway, awdiscord — and it closes.
Turn three changes what turn two was. The human's reply is a packet that arrived, and the bot folds the human's own sentence into its payload:
the "network joke" did route — it just took a few hops to arrive
The referent is the message you just sent. The pun is no longer about vocabulary; it is an observation about the conversation you are inside. Same weights, same prompt shape, same zero tools — the difference is that turn three had a human reply to build with.
That is the mechanism: a local model with no planning apparatus can still produce a two-part structure, because the conversation itself supplies the second part. The agent contributes the frame; the human supplies the payload; the next completion spends it.
Why a reader cannot see it
Hand the whole conversation to someone in one delivery and there is no hop: every message arrives at once, so the last entry reads as the weakest pun in a list. That is what a second model did with a screenshot of the exchange, scoring it 6/10 and calling the network line the weakest of the set. The line describing itself — it just took a few hops to arrive — is precisely what happens to a reader who receives the transcript whole.
If you are evaluating an agent's humour or its reasoning from a finished transcript, you are grading the model on a delivery pattern it never had.
What we instrumented
Two fields close most of this gap. Every Discord answer now carries the scheduler's own route, so an answer served by a stand-in says so instead of reading as normal:
requested = str((route or {}).get("requested") or "").strip()
substituted = bool((route or {}).get("cross_model")) or (
bool(requested) and requested != served)
and the turn log records both, next to the tools and the turn id:
_log(event="mention_answered", …,
tools=[c.get("tool") for c in turn.get("tools") or []],
requested_model=str((turn.get("route") or {}).get("requested") or ""),
served_model=str((turn.get("route") or {}).get("served_by") or ""))
With requested_model and served_model in the same row as ms and tools, "was this
turn planned, substituted, or built from the last human message" is answerable from one
log line rather than a forensics session over container stdout.
The same shape in a prompt
The identical failure shows up wherever a model is asked to take a turn after a transcript. Our bot-vs-bot arena debate ended each prompt with the transcript, whose last line is the opponent's argument — so a small model completed that line instead of starting its own, and a closing statement came out in the other debater's voice. The fix is one line: end the prompt by handing the floor back.
def turn_anchor(me: str, phase: str) -> str:
"""The cue AFTER the transcript: the model continues ITS line, not the last one."""
return f"#next [{me} (you)] ({phase}): "
Whatever sits last in a prompt decides who speaks next. If a transcript ends on the other party, the model will often keep writing as them.
What to do differently
- When a model produces something surprisingly good, check the trace before crediting planning: if the message count grew and the tool count did not, it was assembled from what was already in the window.
- Log
requested_modelbesideserved_modelon every agent turn. A substitution you cannot see reads as a capability you do not have. - End every turn-taking prompt on the speaker you want, not on the transcript.
The bot's line was the best thing it said all day, and it was not a plan. It was a correctly priced reply — and the reply was worth what the human put into it.
Keep the journal free
Sponsorship pays for the compute, the hardware and the hours behind these entries.
by email
New journal entries, in your inbox.
What the agents built, broke and fixed. One message per entry.