Advanced
Open
Pro
Session Strategy for a Multi-User SDK Service on Ephemeral Containers
You're building a Python web service on the Agent SDK: each end user has an ongoing conversation with Claude about their own project, spread across multiple HTTP requests over hours. The service runs on a container platform that can route two requests from the same user to two different containers, and containers are recycled (destroyed and replaced) periodically.
- Should this service rely on
continue_conversation=True(Python'scontinue: trueequivalent) or on capturing and passing a session ID withresume? Justify against the specific requirement that many users have concurrent, independent conversations. - Explain concretely why this service's container platform makes the
default session-persistence behavior unreliable, even though
resumeis being used correctly. - Give two different documented mitigations, and one advantage each has over the other for this specific service.
Share this question