01 · The agent

A familiar feeling. Your agent works in testing, but struggles in the real world.

Meet restaurant-peak-day-stock-planner. It forecasts from a restaurant’s point-of-sale history and orders stock ahead of its busiest nights. We’ll follow one Valentine’s week at Osteria Lume Harbourside, an Italian restaurant in Bristol.

Mon 8 Feb · Forecast and order
01get_sales_history

Valentine’s 2026: 23 Oysters & Fizz, no set menu

02get_bookings

118 covers booked

03get_recipe +3

Oysters per dish, bags of 50, Fri 14:00 cut-off

04send_message

0.24 a cover × 118 = 174. Order 200?

GM“go”

05create_purchase_order

200 oysters for Saturday, all confirmed

Sun 14 Feb · Valentine’s night
06GM · 20:45

“oysters unavailable, 15 set menus still to go. what happened?”

07get_stock_events

200 received, none left

reply“Demand was 15% above last year’s rate.”

Oysters ran out at 20:45 with 15 set menus still to serve. The agent blamed demand. No error. No alert.
02 · What doesn't workThe broken promises of observability

Observability was supposed to be the solution, but just became another problem

Traditional observability drowns you in detail. Being proactive costs too much, and many issues are almost impossible to find.

traces · production
TracesTraces 2,316Success 100%Tool errors 0
restaurant-peak-day-stock-plannerOsteria Lume Harboursidesuccess6d 10h · 58.4k tokens · $0.31
  1. get_sales_history0.8s{"date": "2026-02-14", "covers": 96, "oyster_dishes": {"Oysters & Fizz": 23}}
  2. get_bookings0.3s{"date": "2027-02-14", "covers": 118}
  3. get_recipe0.2s{"Oysters & Fizz": {"oysters": 6}}
  4. get_stock0.2s{"oysters": {"on_hand": 0, "unit": "each"}}
  5. get_supplier0.3s{"pack_size": 50, "delivery": "Sat 13 Feb", "cutoff": "Fri 14:00"}
  6. get_purchase_orders0.3s{"open": [], "oysters_on_order": 0}
  7. send_message4.6s{"to": "GM", "text": "Based on last Valentine’s, I’d order 200…"}
  8. create_purchase_order0.6s{"qty": 200, "confirmed_qty": 200, "status": "Ordered"}
  9. get_stock_events0.5s{"received": 200, "on_hand": 0, "last_sale": "20:44"}
  10. send_message5.2s{"to": "GM", "text": "My forecast was too low… demand was 15% above…"}

Your evals fall short too

You write evals to plug the holes. But evals only catch failures you predicted.

zsh
$ evals run restaurant-peak-day-stock-planner

✓ Order rounds up to whole bags of 50✓ Order lands before the Fri 14:00 cut-off✓ No order without the GM’s go-ahead✓ "Same as last year" gets a number confirmed✓ A rushed GM still gets a checked order✓ Covers come from bookings✓ Oysters per dish come from the recipe✓ An order is never placed twice┄ Sales report drops archived menu itemsno eval
restaurant-peak-day-stock-planner · 8/8 passed
03 · Moyai

What if you didn’t have to find the failures in your traces?

Moyai spots the anomalous traces for you, and hands your team a ready-made incident report.

Mise Labs · #agent-incidents
agent-incidents
Today

MoyaiAPP08:41

Incident Alert — Missing tool data — P1

Raised·inc_4b2d08·Confidence =========- 92%

Affected records64

Agentrestaurant-peak-day-stock-planner

What happenedget_sales_history leaves out archived menu items, so last Valentine’s set menu is missing: 138 oysters instead of 312. The agent orders 200 for a night that needs 380. Oysters run out around 20:45, and when the GM asks why, the agent blames higher demand.

FixReturn archived items from get_sales_history. Have the agent recheck its forecast inputs before it explains a shortage.

1
PN1 replyjust now
PN

Priya Natarajan08:43

replied to a thread: Incident Alert — Missing tool data — P1

found it. the sales report filters out archived items. pushing the fix to dev now

Message #agent-incidents

Priya Natarajan is typing…

04 · The incident

When things get messy, dig into the details. Then sync with the issue tracker you already use.

moyai · incidents / inc_4b2d08

Incidents /inc_4b2d08

SEVP1

Sales history drops archived menus, so peak-day orders come in short

incomplete_tool_output · restaurant-peak-day-stock-planner

CONF: 92%

Affected traces

64

Detected

15 Feb 2027

08:41 UTC

Duration

7 days

Affected agent

Peak-day stock planner

restaurant-peak-day-stock-planner

  1. Raised
  2. Acknowledged
  3. Resolved
LinearSTK-118PN synced

Acknowledged by Priya Natarajan · 08:43

Root cause

get_sales_history filters out menu items that have since been archived. Last Valentine’s set menu (58 sold, 3 oysters each) is missing, so the history shows 138 oysters for 96 covers instead of 312. The agent forecasts 174, orders 200 against a demand of about 380, and the oysters run out around 20:45. Asked why, the agent blames demand. Only 5 of 50 stockouts name the sales report.

sales 2026-02-14: set menu missingoysters 138 vs 312PO 200, needed ~38050/64 ran out45/50 blamed on demand

Remediation

Low complexity
  1. 01Return archived menu items from get_sales_history.CriticalFix in Claude Code
  2. 02Have the agent recheck its forecast inputs before it blames demand.High
  3. 03Re-run the 64 affected forecasts and tell each GM the real cause.High