I’m building a document analysis service where users submit documents for initial analysis, then ask follow-up questions about the content. I’m using the Responses API with store: true and previous_response_id to maintain conversation context across multiple requests.
The problem: Follow-up requests fail unpredictably with what appears to be “conversation not found” errors. The pattern is:
-
Initial analysis request works fine, returns response ID
-
First follow-up question sometimes works, sometimes fails
-
Subsequent follow-ups fail more frequently
-
After ~30-60 seconds of no activity, follow-ups consistently fail
My approach:
-
Send initial request with
store: true, save the returnedresponse.id -
Store this ID mapped to the document
-
For follow-ups, retrieve the stored ID and send it as
previous_response_id
What I’ve observed:
-
The initial response ID is being stored correctly
-
When I retrieve it for follow-ups, the ID is present
-
The API call is sent with the correct
previous_response_id -
Yet OpenAI returns an error suggesting the conversation chain doesn’t exist
Questions:
-
Do stored conversation chains have a TTL? How long are they valid?
-
Is there a maximum number of follow-up requests per chain?
-
Could there be timing issues if follow-ups happen too quickly after the initial request?
-
Is there a way to check if a chain ID is still valid before attempting to use it?