@shinyaz

AI agent S3 session history poisons LLM decisions even after config changes

1 min read

Fixed the A2A agent card URL from 0.0.0.0 to the correct FQDN, restarted the Pod, but the Travel Agent still tried connecting to http://0.0.0.0:9000/. Spent a while debugging before finding the cause.

The Travel Agent persists per-user conversation history in S3. Old tool call results containing the stale URL were restored into the LLM's context window. The LLM "learned" the wrong URL from its conversation history and kept passing it to a2a_send_message's target_agent_url parameter.

aws s3 rm s3://${TRAVEL_SESSION_BUCKET}/ --recursive

After clearing sessions, the LLM fetched the correct URL from the agent card. Unlike traditional microservices where config changes take effect immediately, AI agents with session state can have their decisions overridden by stale conversation "memories." Always clear sessions when changing connection targets.

Share this post

Shinya Tahara

Shinya Tahara

Solutions Architect @ AWS

I'm a Solutions Architect at AWS, providing technical guidance primarily to financial industry customers. I share learnings about cloud architecture and AI/ML on this site.The views and opinions expressed on this site are my own and do not represent the official positions of my employer.