Context continuity when implementing branching: `conversation_id` vs `previous_response_id`
OpenAI Developer Community
February 10, 2026
Hi all,
I’m trying to implement the query edit and regeneration like on the ChatGPT UI, but stuck on how to implement the logic for context continuity. Previously just passed conversation_id to the Responses API in the linear chat and now, I am considering a setup like this:
- At chat start, create conversation_id and pass to all API calls on the main branch
- When a query is ‘edited’, pass only previous_response_id to the API call (I’ve read that you can’t pass both a conversation_id AND previous_response_id since they are mutually exclusive ways of context management)
- For subsequent queries on this ‘edited’ branch, maintain passing previous_response_id only.
Would this mixing of conversation_id and previous_response_id work? I’ve heard that it wouldn’t since previous_response_id works by maintaining a chain of pointers and so if I start with previous_response_id at the edited question only, I’m losing all previous history and so the best option is to just trash conversation_id altogether and only pass previous_response_id all throughout. Any suggestions?
Discussion in the ATmosphere