What makes a toy ReAct loop dangerous in production
The canonical ReAct loop is 15 lines: prompt the model, parse Thought/Action/Observation, call the tool, repeat. It works in demos. It fails in production because it assumes:
- The model always returns valid JSON for tool calls.
- Tools never time out, return errors, or exceed rate limits.
- The conversation can grow forever without hitting the context window.
- A crash loses no state โ you can just restart.
- There is no way to cancel a runaway agent mid-flight.
None of those assumptions hold at scale. A production harness is what you build to make each assumption explicitly false: schema validation gates every tool call, retries handle transient errors, a token budget caps context growth, an abort channel stops the loop from the outside, and a journal lets you resume after a crash. Each of those mechanisms is a seam where bugs hide โ and where most teams skip the work.
