---
title: "What should my app do when a user cancels an OpenAI response mid-stream?"  
description: "What should my app do when a user cancels an OpenAI response mid-stream?"  
author: "Stefano Coppola"  
published: 2026-10-21  
updated: 2026-10-21  
canonical: https://www.mindstick.com/forum/162593/what-should-my-app-do-when-a-user-cancels-an-openai-response-mid-stream  
category: "OpenAI API"  
tags: ["OpenAI", "API Development", "streaming", "Chat applications"]  
reading_time: 1 minute  

---

# What should my app do when a user cancels an OpenAI response mid-stream?

I’m integrating streamed OpenAI responses into a chat interface, and I’m unsure what the cleanest behavior is when someone hits Stop. By then, the server may have received several chunks, while the user has only seen part of the answer.

Should I keep the partial text in the conversation, mark it as interrupted, or discard it and leave the previous turn untouched? I’m also curious how people handle a cancellation that arrives just as the response is finishing.


---

Original Source: https://www.mindstick.com/forum/162593/what-should-my-app-do-when-a-user-cancels-an-openai-response-mid-stream

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
