Add cancel_order tool for unshipped (processing) orders

main

Commit

Jaxson Sprinkles1mo ago

cancel_order takes an order id and returns a CXL-<id> confirmation. It only works while the order is processing; shipped, delivered, refunded, already cancelled and unknown orders return an error and leave the order unchanged. Ids are normalised the same way as lookup_order ('#1050', 'order 1050').

The tool description and system prompt limit it to explicit cancellation requests made after a lookup. It is deliberately not described as a tool for "any order question": it is irreversible, and that wording is the planted R1 regression in evals/, where status questions end up cancelling orders.

evals.reference.ReferenceToolBox is now an alias of ToolBox, so the cancel and multi-step cases run against the real tool. The requires_tool skip tests use a toolbox without cancel_order.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com Entire-Checkpoint: 01M4KHVVPVJ2KT7NQTV6299MZ4

Checkpoints

Add Cancel Order Tool for Processing Orders

Claude CodeOpus 5.5
View session
Checkpoint 1