---
title: "Discussion on \"My AI agent tried to refund $400 it shouldn't have. So I built a flight recorder for it\" | Hashnode"
description: "Discussion on \"My AI agent tried to refund $400 it shouldn't have. So I built a flight recorder for it\". Last week my customer-support agent tried to refund $400 on an order where only $320 was refundable. It didn't get confused. It didn't crash. It read a document from its own knowledge base, believed i"
url: "https://hashnode.com/posts/my-ai-agent-tried-to-refund-400-it-shouldn-t-have-so-i-built-a-flight-recorder-for-it/6a65f391d48a2d4721e5fbec"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [My AI agent tried to refund $400 it shouldn't have. So I built a flight recorder for it](https://biplab24.hashnode.dev/my-ai-agent-tried-to-refund-400-it-shouldn-t-have-so-i-built-a-flight-recorder-for-it?utm_source=hashnode&utm_medium=feed)

Last week my customer-support agent tried to refund $400 on an order where only $320 was refundable. It didn't get confused. It didn't crash. It read a document from its own knowledge base, believed i

Jul 26 · 10 min read · biplab24.hashnode.dev  
Read the article

-   [#ai](https://hashnode.com/tag/ai)
-   [#observability](https://hashnode.com/tag/observability)
-   [#python](https://hashnode.com/tag/python)

## Written by

[Biplab Bera](https://hashnode.com/@Biplab24)

@Biplab24

  
[View profile](https://hashnode.com/@Biplab24)

Software Developer

## Responses 1

Markdown supported · ⌘↵ to post

[Kartik N V J K](https://hashnode.com/@kartik-nvj)

[Jul 27](https://hashnode.com/posts/my-ai-agent-tried-to-refund-400-it-shouldn-t-have-so-i-built-a-flight-recorder-for-it/6a65f391d48a2d4721e5fbec/comment/6a67a8595563574c666ea364)

A flight recorder is the right instinct, because the question after a bad action is always what the agent believed at that moment, not only what it did. Capturing the retrieved context and the tool arguments alongside the decision is what makes the replay worth anything. When you replayed the $400 case, was the fault in retrieval or in the reasoning over correct context?
