← Back to concept explainers

Concept Fable

Exception handling

Conclusion first:Exception Handling is the mechanism by which a system identifies, routes, records, recovers, and escalates when it encounters something that cannot continue normally, abnormal input, tool failure, insufficient permissions, low confidence, or elevated risk. For Agent systems, exception handling determines whether, when encountering edge cases, it keeps guessing, fails silently, or stops safely and enters a controllable process.

Exception Handling · Operations

Read the story first. There is no rush to give a definition here; let the question grow on its own first.

Fable

The pot in the kitchen that no one dared to lift the lid on

There was a very busy restaurant in Guihua Lane. The owner hired a fast cook. He chopped quickly and prepared ingredients accurately, and regulars could get whatever they ordered to the table quickly. The restaurant's business grew better and better, and the kitchen became more and more dependent on him.

This chef was best at handling normal orders: a bowl of noodles with less scallion, a dish with less salt, two tables of guests urging their food. He could handle them all smoothly. But one day, a pot on the stove suddenly gave off a strange smell. The contents were not common ingredients, and the order slip was vague, saying only "make it as usual." The chef paused, not knowing whether to keep cooking, throw it out, or ask the manager.

The helper next to him urged him on, saying the customer was waiting. The chef had no choice but to add seasonings based on experience. After the dish was served, the customer said they were allergic to one of the ingredients. Nothing serious happened at the restaurant, but everyone broke into a cold sweat.

At first the shopkeeper wanted to post a notice: be careful in uncertain situations. The old accountant said that was useless, because being careful is not a process. What the cook really needed to know was: what counts as an anomaly, which step to stop first when an anomaly occurs, whom to notify, what to record, which situations must be redone, and which situations can be remedied.

So the kitchen made an exception log. If a dish was unclear, pause serving; if an ingredient label was missing, send it to the storeroom for verification; if a guest had an allergy history, the front of house must confirm; if the heat was abnormal, isolate the whole pot; if plating failed twice in a row, call the manager to decide. After each exception were written the handler, the recovery method and the record requirements.

The new rules did not slow the chef down. On the contrary, normal orders became faster because he no longer hesitated over a few strange orders. When a weird-tasting pot appeared, he did not have to guess: isolate first, label, notify, wait for confirmation.

The restaurant later discovered that the real danger was not that the system would encounter anomalies, but that when anomalies appeared, the system still pretended everything was normal. Only when anomalies were seen, triaged, recorded, and recovered could the kitchen dare to keep scaling.

The shopkeeper left that pot in the corner of the back kitchen to remind new apprentices: not every pot must be finished by you on the spot. For some pots, the correct action is simply not to serve them.

Reveal

This story is about: exception handling

Exception Handling is the mechanism by which a system identifies, routes, records, recovers, and escalates when it encounters something that cannot continue normally, abnormal input, tool failure, insufficient permissions, low confidence, or elevated risk. For Agent systems, exception handling determines whether, when encountering edge cases, it keeps guessing, fails silently, or stops safely and enters a controllable process.

What matters is that it is not just a term, but a structural problem that repeatedly appears in real AI / Agent systems. Understanding it lets you judge when to add a model, when to change a process, and when to add governance.

Metaphor mapping

  • Fast chef: an agent that executes tasks automatically
  • Normal orders: routine, low-risk tasks with a clear path
  • Strange-tasting pot and vague order slip: abnormal input, unknown state or insufficient context
  • Continue by experience: the Agent keeps guessing and executing under uncertainty
  • Allergy risk: failed exception handling can cause real business harm
  • Exception register: exception handling processes and policies
  • Pause, isolate, notify, verify: the stop-the-bleeding, triage, and validation steps in exception handling
  • Repeated failures prompt the shopkeeper's judgment: retry thresholds and escalation mechanisms
  • Do not serve it yet: for some anomalies, the correct handling is not to continue completing the task, but to stop delivery and hand off to a human or a recovery process

Andy Ren Xu's judgment

The practical value of this concept is that it helps you break "AI features that look smart" into deliverable, verifiable, and governable units of work.

escalation pathfallbackhuman reviewincident managementconfidence threshold
京ICP备2026014272号