Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google ADK delete_session() Does Not Delete Long-Term Memory

Independent XBSTACK reproduction of the failure shape reported in google/adk-python#6949 and resurfaced in #7110.

Verified result

On both google-adk==2.8.0 and google-adk==2.9.0:

  1. create an in-memory ADK session;
  2. append a user event containing a unique marker;
  3. copy that session into InMemoryMemoryService with add_session_to_memory();
  4. verify the marker is searchable;
  5. call InMemorySessionService.delete_session();
  6. verify the session is gone;
  7. search long-term memory again.

The session is deleted, but the copied memory remains searchable. BaseMemoryService also exposes no deletion method in either tested version.

This is not evidence that every Google ADK memory backend behaves identically. It is a deterministic reproduction against InMemorySessionService + InMemoryMemoryService, plus an API-surface check on BaseMemoryService.

Run

Requirements:

  • Python 3.11+
  • uv

Run the tested version matrix:

bash run.sh

Or run one version directly:

uv run --with google-adk==2.9.0 python repro/repro.py

A successful reproduction prints JSON and exits 0. The script asserts that:

  • the session no longer exists after delete_session();
  • memory exists before deletion;
  • the same memory still exists after deletion;
  • BaseMemoryService has no callable method containing delete.

Why this matters

Deleting a conversation session is not equivalent to deleting data previously copied into long-term memory. If an application offers a user-data deletion flow, it must treat Session, State, Artifacts, and Memory as separate persistence surfaces and verify each one independently.

Until ADK exposes a backend-independent memory deletion API, applications that require deletion must use the backing store's supported deletion mechanism or avoid ingesting data that cannot later be removed through their chosen memory service. Do not assume delete_session() is a complete user-data deletion operation.

Tested versions

See version-matrix.md.

Related XBSTACK reading

Upstream references

Scope and limitations

  • No external model API is called.
  • No Vertex AI credentials are required.
  • This repository does not claim that the upstream issue is fixed or unfixed beyond the exact versions tested here.
  • VertexAiMemoryBankService is not exercised because that would require external infrastructure and credentials.
  • The test intentionally uses a unique marker so the before/after search result is unambiguous.

Maintenance status

Verified by XBSTACK on 2026-09-15. Re-run the matrix after future Google ADK releases; if BaseMemoryService gains deletion support or delete_session() begins cascading into memory, the assertions should fail and the conclusion must be updated.

License

MIT

About

Minimal reproduction: Google ADK delete_session removes the session but leaves memory copied by add_session_to_memory searchable.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages