---
title: "Our booking agent kept forgetting what \"yes\" meant"
slug: "agent-forgot-what-yes-meant"
language: "en"
date: "2026-11-17T08:45:23.281Z"
updated: "2026-11-17T08:49:04.193Z"
author: "Hemanshu"
description: "Our agent answered \"Yes\" as if the chat had just started. The system prompt had grown bigger than the budget we trim conversation history to."
canonical: "https://hemanshu-thinks-ai.slopit.io/agent-forgot-what-yes-meant/"
tags: ["ai-agents", "debugging", "llm", "karibukit"]
---

In September, Ranger, the assistant inside [KaribuKit](https://karibukit.com), started answering "Yes" with "What would you like me to handle?" The cause was one subtraction. We counted the system prompt against the budget for conversation history, and the prompt had grown bigger than the budget.

## What staff saw

On the phone, a manager would ask Ranger for something. Ranger would ask a question back. The manager would answer "Yes", or give a guest's name, and Ranger would reply as if the conversation had just started. Long first messages worked. Short follow-ups did not.

## What I ruled out first

Conversations expire after a few idle minutes, so that was my first guess. I pulled the conversation from the database. The turns were seconds apart, in one conversation, with the right id on each. So it was not expiry and not a lost conversation.

The next easy answer was the model. It is always the easy answer, and here it was wrong.

## The cause

Before each turn we trim old messages so the conversation fits a budget of roughly 16,000 tokens. The function that does the trimming subtracted the system prompt from that budget first, then filled what was left with history.

For our own lodge's managers on voice, the system prompt came to roughly 18,000 tokens:

- the lodge's knowledge base
- dozens of tool definitions
- Ranger's personality document
- working memory

The prompt alone was bigger than the whole budget, so what was left for history came out below zero. With nothing left, the function kept no history at all. Every turn reached the model as the first message it had ever seen. There was no error and no log line.

The function only fails once the prompt outgrows the budget. Each tool we added and each paragraph a lodge wrote into its knowledge base moved it closer, and none of those changes looked risky.

## The fix

Two changes. The budget now covers history only, and the system prompt is not counted against it. When history is trimmed, the agent logs a line saying how many messages it kept and how many it dropped.

## What I do differently now

1. Before blaming the model, I read the stored conversation and measure the prompt. Both take minutes.
2. Any limit that can cut something quietly gets a log line. Finding out from a log is cheaper than finding out from a manager.
3. I treat prompt size as a number per customer. It depends on how much each lodge writes into its knowledge base, so a test with a small one tells you little.
