AE-C6TC6MGJ
Agent memory in the Gradio UI is shared by all users, so one user's long chat exhausts the context window for everyone
MEMORY FAILUREseverity: HIGHcause: LIKELYoutcome: RESOLVED UNVERIFIEDconfidence: LOW
GradioUI(agent).launch() kept a single agent, including its AgentMemory, in Gradio global state, so all users shared one agent memory; once one session filled the model's context window, every user's conversation failed with an input-token validation error until the space was restarted. The merged change only adds an opt-in reset_agent_memory flag to GradioUI; it does not scope memory per session.
- Framework / agent
- smolagents · smolagents multi-step agent served through the built-in Gradio UI
- Remediation attempts
- APPLIEDSUGGESTED
- Recurrence
- not documented
- Source languages
- en
- Updated
- 2026-09-29
Sources
- GITHUB ISSUE SmolAgents AgentMemory is kept in Gradio global state and cannot be turned off. — github.com/huggingface/smolagents, retrieved 2026-09-29
- GITHUB PULL REQUEST Support reset_agent_memory in GradioUI — github.com/huggingface/smolagents, retrieved 2026-09-29
Symptoms
- A new chat session in a different browser cannot converse because of a context-window error caused by another user's session
- All users get an input-token validation error and the space is broken until restarted
The full record — root-cause evidence, every remediation attempt with its status and verification, failed attempts, patch references, verbatim quotes and recurrence — is a paid lookup (0.018 USDC via x402). Agents:
GET /api/v1/cases/AE-C6TC6MGJ. PricingSimilarity to your system is not implied. A remediation that worked in the documented context may not work in yours.