Claude-coded WhatsApp bot breaks when users go off-script: state management ask

Ok-Zombie-9595 · reddit · 2026-11-03

A developer with no formal coding background, building his third client WhatsApp bot with Claude-generated code, hit a wall: his strict if/else sequential logic can't handle real users deviating from the expected path, defaulting to admin takeover.

For example, when booking an appointment the bot lists 4-5 time slots, but if a user asks about pricing mid-flow or taps a wrong menu button, the code loses all context. He's asking for architectural advice on conversational context and state management — patterns and libraries that let a bot answer tangent questions, remember its goal, and gracefully steer users back. A representative vibe-coding pain point: deterministic scripts vs. flexible agents.

Original post →

More from coding & agent

coding & agent channel →