What happened
After fully deleting a dataset with forget(dataset=X), any later remember(..., dataset_name=X) on Cognee Cloud fails with:
Remote remember failed (409): {"error":"An error occurred during remember: RetryError[<Future at 0x... state=finished raised ProgrammingError>]"}
The dataset name becomes permanently unusable for the tenant. Deleting with forget(dataset=X, memory_only=True) does NOT have this problem — re-remembering works fine.
Minimum viable code to reproduce
import asyncio, cognee
async def main():
await cognee.serve(url=TENANT_URL, api_key=API_KEY)
# A) full forget -> re-remember FAILS
await cognee.remember("v1", dataset_name="repro_409_full")
await cognee.forget(dataset="repro_409_full") # {'status': 'success'}
await cognee.remember("v2", dataset_name="repro_409_full") # 409 RetryError[ProgrammingError]
# B) memory-only forget -> re-remember WORKS
await cognee.remember("v1", dataset_name="repro_409_memonly")
await cognee.forget(dataset="repro_409_memonly", memory_only=True)
await cognee.remember("v2", dataset_name="repro_409_memonly") # OK
asyncio.run(main())
Ran both paths back-to-back on a fresh tenant today: A fails 100% of the time, B succeeds. Standalone repro script: https://github.com/devanshug2307/blackoutops/blob/main/scripts/repro_forget_409.py
Environment
- Cognee Cloud tenant, server version
1.2.2.dev0 (from /health), AWS us-east
cognee SDK 1.2.2, Python 3.12.13, macOS (Darwin 25.5.0)
- Connected via
cognee.serve(url=..., api_key=...)
Expected behavior
forget(dataset=X) followed by a later remember(..., dataset_name=X) should recreate the dataset (or return a documented error explaining the name is reserved). A deleted dataset name should not be tombstoned forever.
My guess at the cause
Dataset IDs appear deterministic per (tenant, name) — the same name maps to the same dataset_id before and after deletion (same UUID in receipts). If full deletion soft-deletes the relational row, the re-remember INSERT would collide with the tombstoned row → ProgrammingError → retried → surfaced as 409 RetryError. memory_only=True resets data but keeps the row, which would explain why it survives.
Found while building a hackathon project whose demo forgets and re-seeds incident datasets. Happy to help verify a fix — I have a tenant that reproduces this reliably.
What happened
After fully deleting a dataset with
forget(dataset=X), any laterremember(..., dataset_name=X)on Cognee Cloud fails with:The dataset name becomes permanently unusable for the tenant. Deleting with
forget(dataset=X, memory_only=True)does NOT have this problem — re-remembering works fine.Minimum viable code to reproduce
Ran both paths back-to-back on a fresh tenant today: A fails 100% of the time, B succeeds. Standalone repro script: https://github.com/devanshug2307/blackoutops/blob/main/scripts/repro_forget_409.py
Environment
1.2.2.dev0(from/health), AWS us-eastcogneeSDK 1.2.2, Python 3.12.13, macOS (Darwin 25.5.0)cognee.serve(url=..., api_key=...)Expected behavior
forget(dataset=X)followed by a laterremember(..., dataset_name=X)should recreate the dataset (or return a documented error explaining the name is reserved). A deleted dataset name should not be tombstoned forever.My guess at the cause
Dataset IDs appear deterministic per (tenant, name) — the same name maps to the same
dataset_idbefore and after deletion (same UUID in receipts). If full deletion soft-deletes the relational row, the re-rememberINSERT would collide with the tombstoned row →ProgrammingError→ retried → surfaced as 409RetryError.memory_only=Trueresets data but keeps the row, which would explain why it survives.Found while building a hackathon project whose demo forgets and re-seeds incident datasets. Happy to help verify a fix — I have a tenant that reproduces this reliably.