Apologise and ask to double-check when an order id is unknown
main·
Commit
When lookup_order, cancel_order or issue_refund reports "order '<id>' not found", the reply should apologise and ask the customer to double-check the number instead of surfacing the raw tool error.
- System prompt: new rule row telling the model to apologise, ask the customer to double-check the order number and never repeat the raw error.
- Loop guard: if the final reply still echoes a raw "order ... not found" error verbatim, it is replaced with a fixed apology that names the id and asks the customer to double-check it. Replies that already phrase it nicely are left untouched.
- Tests cover the guard for all three order tools and the pass-through case.
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com Entire-Checkpoint: 01M4KJ8RQY3FNC5FPARPYPMY9W