Nothing Broke, So Nothing Got Fixed

Nothing Broke, So Nothing Got Fixed

I removed PAI from my machine and did not think about it again. Weeks later I went looking for the Telegram assistant I had built on top of it and found the systemd unit disabled and inactive. I had not noticed it was gone. Building custom software got cheap. Noticing when it quietly stops earning its keep did not.

Silence Is What Working Sounds Like

The bot still ran when I started it by hand. What it carried was a dependency on a framework that no longer existed. One module imported a PAI tool path I had deleted, and nothing imported that module, so the broken import never fired.

The config layer was worse in a quieter way. It required INFERENCE_PATH at startup, a variable nothing in the codebase read, pointing at a file nothing opened. Tidying that line out of .env would have stopped the bot from booting over a tool it had not used in months. The landmine was armed by cleanup, not by neglect.

A smoke detector with a dead battery makes exactly as much noise as one that works.

The Easy Path Worked, Which Is Why It Lasted

Here is how the bot held a conversation together across messages:

const systemPrompt = conversationContext
  ? `${MIA_EXECUTOR_SYSTEM_PROMPT}\n\nConversation so far:\n${conversationContext}`
  : MIA_EXECUTOR_SYSTEM_PROMPT;

Every message pasted the entire transcript into the system prompt. Continuity worked, and it is the obvious way to get continuity when the transcript is already sitting in memory.

Prompt caching is a prefix match. The provider caches the front of a request and charges a fraction to read it back, but only while that front stays byte-identical. With the transcript living inside the system prompt, the prefix moved every turn, so nothing in front of it could be reused. A 20-message conversation reprocessed 20 messages, at full price, 20 times.

The history was capped at 40 messages, oldest spliced off the front. I doubt that cap ever fired. Conversations with a phone assistant run short, so the amnesia designed into it stayed theoretical and the cost stayed invisible. Nothing broke. That is why it lasted.

Claude Code has --session-id and --resume. The first message creates a session, every message after resumes it, and the transcript lives on the harness side, which puts the system prompt back to being a constant. I measured the result: by the third turn a resumed session read 28,430 tokens out of cache and wrote 18 new ones. The change came to about 40 lines, most of it deletion, and I pushed the result.

My Own Software Deserves the Same Inspection I Give Clients

The fix took an afternoon. The better output was the question underneath it, which is what else is sitting on this machine that I wrote against a harness that has since changed.

Everything worth building was built against a snapshot: the tools available then, the models available then, and whatever I understood at the time. All three moved. The bot was written when the correct answer was to manage the transcript by hand, and that stopped being the correct answer without anything on the machine announcing it.

I read the silence as working. Now I press the test button.

🤖 AIL LEVELS: This content's AI Influence Levels are AIL3 for the writing, and AIL4 for the images. AI Influence Level (AIL) framework

Subscribe to ClearText

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe