# Google ADK rewind_async still leaks undone turns into long-term memory

*Disclosure: I work on MemorySync (I'm Mohammed, the founder). I drafted this page with AI assistance and checked it against the source issue, the fix commit and the MemorySync Google ADK guide on Oct 28, 2026. I didn't run any code for this page.*

## The question

[google/adk-python#7570](https://github.com/google/adk-python/issues/7570) (opened Oct 16 2026) reports that after `Runner.rewind_async`, calling `add_session_to_memory` still stores the turns the rewind took back. Rewind keeps every event in the session and appends a rewind event; prompt building filters through `_apply_rewinds`, but the memory services named in the issue (`InMemoryMemoryService`, `SqliteMemoryService`, `VertexAiMemoryBankService`, `VertexAiRagMemoryService`, `FirestoreMemoryService`) read `session.events` directly. So if a user takes back a wrong address or something private, `load_memory` or `preload_memory` can bring it back in a later session.

**Status (checked 2026-10-28):** closed as completed on Oct 28, 2026 (05:13 IST). PR [#7571](https://github.com/google/adk-python/pull/7571) ("keep turns a rewind took back out of long-term memory") landed on main as commit `2591397` (the PR itself shows as closed rather than merged, because the change was imported through Google's Copybara sync). The commit changes the in-memory, SQLite, Firestore, Vertex AI Memory Bank and Vertex AI RAG memory services. The latest ADK release, v2.13.0 (Oct 23), predates it, so the fix isn't in a tagged release yet.

## What to do until the fix is released

*Not run for this page.*

- **Don't ingest a rewound session as-is.** If your app uses rewind, either skip `add_session_to_memory` for sessions that contain a rewind event, or build a filtered copy of the session that holds only live events before ingesting.
- **Ingest at the end, not per turn.** On v2.13.0 and earlier, memory written before a rewind isn't removed by the rewind; you'd have to delete it from the memory backend yourself. Per the fix commit, after upgrading, `add_session_to_memory` on the SQLite and Firestore services also deletes stored entries for turns a rewind took back.
- **Watch for the first ADK release after v2.13.0** that includes commit `2591397`, and re-check your memory service after upgrading ADK.

## Common questions

**Is it fixed?** On main, yes: issue #7570 was closed on Oct 28, 2026 by commit `2591397` (PR #7571). As of v2.13.0, the latest release when I checked, the fix isn't in a tagged release.

**Does the fix delete memories that are already stored?** Per the commit message, on `add_session_to_memory` the SQLite and Firestore services now also delete stored entries for events a rewind took back. Entries for events that aren't in `session.events` at all, such as turns outside a session loaded with `num_recent_events`, are kept.

## Where MemorySync fits

The [MemorySync Google ADK guide](https://docs.memorysync.io/guides/google-adk?utm_source=hashnode&utm_medium=organic_page&utm_campaign=v5_oct25&utm_content=pseo_google-adk-rewind-long-term-memory) documents a `MemorySyncMemoryService` whose `add_session_to_memory` sends the user's messages from `session.events`. The guide doesn't cover rewinds, so filter rewound events out of the session yourself before calling it. What MemorySync adds is a delete-by-ID operation scoped to a user, which helps if an undone fact was already stored. To see save and recall in your browser first, try the [MemorySync playground](https://memorysync.io/?utm_source=hashnode&utm_medium=organic_page&utm_campaign=v5_oct25&utm_content=pseo_google-adk-rewind-long-term-memory). Founding offer: use code FOUNDING30 for 30% off Starter for your first 3 months (Settings → Billing).

## Sources

- google/adk-python#7570, "After Runner.rewind_async, add_session_to_memory still stores the rewound turns in long-term memory" (read 2026-10-28)
- google/adk-python PR #7571 (closed; its change landed on main as 2591397; issue #7570 closed 2026-10-28; read 2026-10-28)
- ADK docs: rewind, <https://adk.dev/sessions/session/rewind/>
- MemorySync Google ADK guide: [docs.memorysync.io/guides/google-adk](http://docs.memorysync.io/guides/google-adk)

Founding offer: use code FOUNDING30 for 30% off Starter for your first 3 months (Settings → Billing).
