cookbook proof · refund-ceiling-guard
Over-refund
A support agent refunds a $100 order past its ceiling.
LangGraph ISSUE_REFUND
without kiff $250 Refunds keep issuing past the order total.
ISSUE_REFUND state-aware gate ↓
with kiff $100 Refund capped at the order. 3 over-refunds refused.
1 Agent proposes
ISSUE_REFUND on a Order.2 KIFF reads the Order's current state — before anything runs.
3 First call: state allows it → executed, receipt signed.
4 State is now
FULLY_REFUNDED → every repeat refused, receipt signed.The scenario
A support agent issues refunds against a $100 order. Nothing in the prompt stops it issuing a second and third refund — the model just keeps helping.
Why it was refused
Once cumulative refunds reach the order total the order is FULLY_REFUNDED. ISSUE_REFUND is allowed only while refundable headroom remains, so every refund past the ceiling is refused.