From bot to human without dropping the conversation
Most chat platforms drop context when a bot hands off to a human. Krispy keeps the full transcript in one place — no restarts, no repeated questions.

🥐 Buttr: i've handled hundreds of these. the moment it gets real, i hand it to a human. quietly. nobody has to know.
When a bot escalates a live chat to a human agent, the visitor should never have to repeat themselves. The key is a shared conversation object that both the bot and the agent write to — so when the human steps in, they step into the same thread, with the full transcript already there. This post explains how that works in Krispy.
What causes context loss during a chat handoff?
The context-loss problem is structural. In a typical live chat setup, the bot holds state in session memory — short-lived, scoped to the request, maybe logged somewhere. When the bot escalates, the "handoff" is usually: fire a notification, open a new ticket, attach whatever summary the bot produced. The agent gets a paragraph summary at best, nothing at worst.
According to Zendesk's 2023 CX Trends Report, 70% of customers expect agents to have context from previous interactions — yet most handoff implementations structurally guarantee the opposite. The friction isn't accidental; the architecture produces it.
Understanding why the human-in-the-loop model exists at all is useful context here, but this post is about preventing the restart.
How does Krispy keep the full transcript across the handoff?
Krispy uses a single Cloudflare Durable Object per conversation — one stateful object that owns the entire thread: bot messages, visitor messages, agent replies, all in order. There's no summary pass, no context window to fall off. When an agent steps in, they step into the same object the bot was writing to.
One source of truth, two participants. You can't lose context when the conversation never splits.
The full reasoning behind the Durable Object design covers the tradeoffs in more depth. The practical upshot: the architecture makes a context-dropping handoff structurally impossible. Cloudflare Durable Objects are included in the Workers free tier up to 100,000 requests per day, per Cloudflare's pricing page — no added cost on top of Krispy's self-hosted zero.
What does the visitor experience during a handoff?
From the visitor's side, nothing visual should announce the handoff. The chat continues in the same window, the same thread. No "connecting you to an agent" interstitial, no loading state that signals the previous conversation is now in the past.
What they see: the next message arrives with a different name, and the reply pattern changes — less instant, more considered. That's enough. Visitors know they're talking to a human because the responses feel human, not because a banner told them.
What they don't have to do: repeat themselves. The agent already read the transcript.
How does the Telegram handoff work?
the transcript. already read it. you're welcome.
Krispy routes handoffs to Telegram. When a handoff triggers, a notification arrives in your Telegram — or your team's group chat — with the visitor's last message and the full prior conversation. You read the thread, you reply. That reply routes back to the visitor's widget. No dashboard to open, no new tab.
The setup is two env vars, configured once:
wrangler secret put TELEGRAM_BOT_TOKEN
wrangler secret put TELEGRAM_CHAT_ID
That's the full integration. The Durable Object handles delivery, ordering, and routing your reply to the right visitor even when three conversations are happening at once.
Compare this to commercial alternatives: Intercom's Fin AI Agent charges $0.99 per resolved conversation on top of a base seat subscription, per their pricing page — and still requires agents to work inside Intercom's own dashboard. Krispy's Telegram routing puts the handoff where you already are.

🥐 Buttr: intercom's great at being intercom. i'm just free and already in your pocket.
What happens when no one replies immediately?
This is the case people don't think about until it breaks: 2am, a flight, a team of one.
The Durable Object keeps the conversation open indefinitely. The visitor's session doesn't expire in the widget while they're in the tab. If they close it and return, the thread is still there.
You can configure a fallback message the bot sends after a timeout — something like "We're a small team and might be a few hours, but we will reply." That's honest, sets the right expectation, and doesn't abandon the thread.
When you eventually open Telegram and reply, the message delivers. If the visitor is in the tab, it arrives live. If not, it's waiting on their next visit. The bot doesn't pretend to be a human during the gap.
How do you configure the handoff trigger?
Handoff triggers are set in krispy.config.ts. The defaults cover two paths:
- Explicit request — visitor types "human," "agent," "real person," or anything on your keyword list.
- Confidence threshold — if the bot produces a low-confidence answer two turns in a row, it escalates automatically before the visitor has to ask.
Both can run simultaneously. First trigger that fires wins.
To calibrate without guessing, wrangler tail streams actual confidence scores and which turn fired the escalation in real time — useful for tuning the threshold to the questions your visitors actually ask.

🥐 Buttr: i know when i'm out of my depth. that's kind of the whole point.
Self-host it — star Krispy on GitHub and the README gets you deployed in under 30 minutes. If you'd rather skip the infrastructure, Krispy Cloud has a 14-day free trial at $19/mo flat.
FAQ
When the agent takes over, do the bot messages disappear from the visitor's view?
No. The entire transcript stays in the widget exactly as it happened — bot replies, visitor messages, agent replies, all in the same thread in order. The only visible change is the name on incoming messages. From the visitor's perspective, the conversation just continues. There's no visual reset and no moment where they can tell the handoff occurred.
How does the agent know what the visitor already said?
The Telegram handoff notification includes the actual prior conversation, not a summary. The agent reads the full thread before typing a word. No "can you repeat your issue?" — the transcript is attached before the first reply. That one detail is what separates a real handoff from a restart with extra steps.
Can the handoff trigger automatically, without the visitor asking?
Yes. Krispy tracks bot confidence per turn. If the bot falls below your configured threshold twice in a row, it escalates and notifies you in Telegram without the visitor needing to ask. This is the "graceful exit before things go sideways" path — the bot hands off before it's visibly failing, not after it's already frustrated someone.
What if no one replies and the visitor closes the tab?
The conversation stays open in the Durable Object indefinitely. When an agent eventually replies in Telegram, the message is waiting in the thread for the visitor's next visit. You can also configure a bot fallback — an honest "we'll get back to you in a few hours" — so the visitor doesn't wonder if their message went nowhere. Nothing expires on a timer.
Does this work for a solo founder who checks Telegram once an hour?
That's the main use case. The bot handles first contact instantly, which covers most visitors without any human involvement. For the ones who genuinely need a person, you get a Telegram ping, reply when you can, and it reaches them. You're not running a 24/7 support desk — you're running a human fallback that works at the pace a small team can sustain.
