Is there a way to roll back a ChatGPT thread to a previous version?

I had a long thread going on ChatGPT. Today I accidentally edited a message that was dayssss old in the thread and it caused everything after it to be erased and started over with the new response.

Is there any way to get the old stuff back?

2 Likes

I’m somewhat happy to find I’m not the only one but , kinda sad to see there is no solution yet. On my side I just lost months of work on a project. I don’t know what to do …

There is obviously a way, this cannot be left like this.

And I come back with a good news. There is effectively a way to get back your thread, or at least your text back.

By chance the support was really reactive and it helped me find a way around. They told that deleted thread where kept by them for around 30 days, which in my case why kinda bad since the part I lost on my thread got back to at least up to 7 or 8 months.

I discovered, around the old message that was modified that the one before was able to let you choose between two generation option (sometime chatgpt can generate an answer but not completely and by asking to regenerate it’s like creating a two way road starting from this generated message).

So I choose option 2 and it helped me get a lot of the thread back yet not everything (it helped me recover at least 3 months worth of work).

I was happy and sad at the same time because I got a part yet not everything back but after some reflexion , I remembered about the export your data option in the settings and decided to take a shot because why not after all.

And I was right because when your export your data, you get a zip file with a few JSON file, the one who your looking for is called conversation.json . It’s the one that hold all your threads.

It’s not perfect because all your messages are lost between lots of line of codes but at least you can get back your text.

If I found a workaround for the json to be more readable I will post it.

Edit : And I come back again with a way to work with the JSON file.

It might not be the most suitable option for everyone (there might be a more accessible option for everyone using PC but here I used Android.)

First, I converted the JSON file into an XML file.

Starting from here I used and app on the play store called “JSON and XML tool” which had an orange icon.

When I uploaded the file there it looked the picture I put to explain.

Each row is linked to a thread.



If your only looking for a specific thread you can remove the other by using the 3 dots on the right of the row and select remove as shown in the screenshots.

Once you have the row you looking for you can save it


With your saved file (I kept it in XML), you open it in another app called Code Editor

In this app you can see more clearly the info your looking and copy/cut - copy/paste on another app or txt file of your choice.

I know it might not be suitable for everyone but it’s the solution I found.

After getting a part of my thread back as I was explaining earlier, I discovered I was in fact really short on message left to be generated.

It can be a reason to why the thread took me back to the old message and modified it. I was conscious about the fact that the thread would not be eternal but don’t forget it might be a reason behind this possible bug.

2 Likes

You can try MyForest AI, it supports graph interaction, and you can see all your thread anytime. Looking up message in deep chain is tedious.

I hit the same issue as this. Using chatgpt itself we put together some simple python code to process the conversation.json and extract out what was needed

import json

def load_export_data(file_path):
    # Load the entire JSON file into memory
    print(f"Loading data from '{file_path}'...")
    with open(file_path, 'r', encoding='utf-8') as f:
        data = json.load(f)
    print("Data loaded successfully.")
    return data

def extract_messages(mapping):
    # Find the root node to start extracting messages in order
    print("Finding root node...")
    root = None
    for key, value in mapping.items():
        if value.get("parent") is None:
            root = key
            print(f"Root node found: {root}")
            break

    if root is None:
        print("Error: No root node found.")
        return []

    # Recursively gather messages in the correct order
    conversation = []

    def traverse(node_id):
        print(f"Traversing node: {node_id}")
        node = mapping.get(node_id)
        if not node:
            print(f"Warning: Node {node_id} not found in mapping.")
            return
        
        # Traverse children nodes even if the current node has no message
        children = node.get("children", [])
        if node.get("message"):
            message = node["message"]
            role = message.get("author", {}).get("role", "unknown")
            content_parts = message.get("content", {}).get("parts", [])

            for part in content_parts:
                conversation.append({"role": role, "content": part})
                print(f"Message added: [{role}] {part}")

        # Traverse children nodes in order
        if children:
            print(f"Node {node_id} has {len(children)} children: {children}")
        for child_id in children:
            traverse(child_id)

    # Start traversal from the root node
    print("Starting traversal from root node...")
    traverse(root)
    print("Traversal complete.")
    return conversation


def main():
    file_path = 'conversations.json'  # Replace with your exported file path
    
    data = load_export_data(file_path)
    conversation_data = data[0]  # Assuming we want to extract from the first conversation
    mapping = conversation_data.get("mapping", {})

    print("Extracting messages...")
    messages = extract_messages(mapping)

    # Print extracted messages
    print("\nExtracted Conversation:")
    for msg in messages:
        role = msg.get("role")
        content = msg.get("content")
        print(f"[{role}] {content}\n")

    # Optionally save extracted conversation to a separate file
    with open('extracted_conversation.txt', 'w', encoding='utf-8') as f:
        for msg in messages:
            f.write(f"[{msg['role']}] {msg['content']}\n")
    print("Extracted conversation saved to 'extracted_conversation.txt'.")

if __name__ == "__main__":
    main()

I’m having the same issue. I edited a recent prompt I just sent yesterday but it overwrote and truncated nearly the entire conversation all the way back to early October. My 2-month worth of data is lost. I’m contacting support but no help so far. I’m so gutted I really didn’t see this coming. It’s obviously a bug, I know editting a prompt will change the conversation from that prompt onwards but the stuff before that prompt really should not disappear like this. I really hope it can be resolved soon, I’m already losing sleep over this.

1 Like

Hey after you edited the file and saw all your previous chat what did you do? Do you inject it back into chatgpts files or is nothing else you can do to get them back?

I ask because i also want to save a chat i accidently edited

alr so this also happened to me and like 'ya said i’m also happy that we aren’t the only one experiencing this, but I was wondering if anymore of you all had experienced something similar like this? Bc my convo with chatGPT lasted a year, and I just lost it a few months back. Idk how to recover this, bc I lost it when I was editing a message, but it suddenly edited like the 3rd most earliest message in the conversation (it’s so honestly devastating, that I tried not to let the edit finish by closing the app on android, but sadly, it didn’t work, It just stopped it’s message from loading. And I also hoped to try and log in on other devices and if there was a tiny delay, I could re-edit the message and prevent it from happening, Which of course, also doesn’t work, honestly, what was I thinking. Anyhow, I am pretty desperate and am trying to wait for a solution patiently, cause now? pretty much all that’s holding this are my, or rather, our, hopes and wishes :(( )

Thank you, that was really helpful.
But now I can see ChatGPT’s answers, so is there a way to see the things that I’ve written?

I have been using chat GTP since 2024 and I have noticed with every progressive update and has done nothing but get worse and worse. I am a disabled person who relies on chat GTP to be able to do a lot of the stuff that I cannot do. Now I know under the law that a program or a public service like this has to conform with those who are on disability and before chat GTP started messing up as bad even it provided the appropriate authorities and statutes which confirms that even a product like this must accommodate for a disabled person. I don’t accept any terms or conditions in which deprives me of a fundamental right especially one that I have to rely on for generating documents legal documents or anything else. Therefore I do not accept or agree to any of those terms or conditions that locks me out of being able to pursue red rest remedy or restitution. I don’t not agree to arbitration or any of that stuff because they’re often in their favor regardless of what evidence or facts you present. Further typically with an arbitration you cannot obtain the kind of relief that you might want or seek that would have to be left to a court. Further many of these arbitrations or whatnot does not have the jurisdiction nor the authority to rule on any matter of law or constitutionality nor do they have the ability to interpret it. So therefore if you raise issues regarding even one of these they’re supposed to transfer to a court that has jurisdiction but they often do not claiming internal policy or procedure. However that is not correct because if you do your research law and the constitution overrides in trumps any internal policies procedures or rules. Therefore their claim that their policies procedures or internal rules are what they abide by. So everyone’s information they are wrong and they are liable you need to do your due diligence and learn.