-
Notifications
You must be signed in to change notification settings - Fork 843
Open
Labels
Description
Problem Statement
The SDK currently persists all session state to a hardcoded filesystem path (~/.copilot/session-state/{sessionId}/). While this works well for single-node and local development scenarios, it creates significant challenges for production deployments that need:
- Horizontally scaled services: Multiple server instances can't share session state without a shared filesystem or sticky sessions.
- Serverless / ephemeral compute: Environments like Azure Functions, or short-lived containers have no durable local filesystem at all.
- Custom retention and compliance: Organizations may need session data stored in specific databases or regions for audit, TTL, or data residency requirements.
- Operational consistency: Teams already running Redis, PostgreSQL, etc for other application state want to use the same infrastructure for session data rather than bolting on a filesystem dependency.
Currently this can be achieved by mounting a share as described in ~/.copilot/session-state/ to a shared volume (as described in the Session Persistence guide). It works but this isn't practical or possible in all situations.
Proposed Solution
Introduce a session store abstraction in SDKs to allow saving and rehydrating sessions.
Reactions are currently unavailable