Claude reverts code for no reason

Claude keeps reverting code that I’ve modified back to the code received from the chat, even after I start a new chat.
Cursor created this python dictionary in an earlier chat:

{
“uuid”: gard_uuid,
“label”: cells[“Gardsnamn”],
“snid”: cells[“Gardsnamn_SNID”],
“adm1”: cells[“Fylke”],
“adm2”: cells[“Kommune”],
“year”: cells[“År”],
“sosi”: SOSI_GARD,
“cadastre”: [{“gnr”: int(cells[“GNR”])}],
“knr”: cells[“KNR”],
“misc”: {
“GNR”: cells[“GNR”],
“Kjelde”: cells[“Kjelde”],
“Matrikkelinformasjon”: cells[“Matrikkelinformasjon”]
}

I’ve changed it to this:

{
“uuid”: bruk_id,
“label”: cells[“Bruksnamn”],
“snid”: cells[“Bruksnamn_SNID”],
“adm1”: cells[“Fylke”],
“adm2”: cells[“Kommune”],
“year”: cells.pop(“År”),
“sosi”: SOSI_BRUK,
“within”: gard_uuid,
“knr”: cells[“KNR”],
“misc”: cells,
“cadastre”: [{“gnr”: int(cells[“GNR”]), “bnr”: int(cells[“BNR”])}]
}

When I ask cursor to change another part of the script, it reverts “misc” back to the initial object, even though it’s irrelevant to my request.
I’m currently using claude 3.7, but I’ve experienced this issue before with 3.6

False alarm. This was actually different parts of the code. I think I’ve had parts of my code reverted before though, but this thread may be deleted until I’m able to reproduce it.