docs: document EnableSessionStore and one-shot session guidance#1822
Open
syf2211 wants to merge 2 commits into
Open
docs: document EnableSessionStore and one-shot session guidance#1822syf2211 wants to merge 2 commits into
syf2211 wants to merge 2 commits into
Conversation
Add EnableSessionStore to SessionConfig documentation and a new One-shot / Hosted Environments section across all language READMEs. Explains when to disable infinite sessions and the session store in ephemeral containers to avoid unnecessary SQLite persistence. Related to github#1814
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the language SDK READMEs to document EnableSessionStore (and equivalents) and adds guidance for “One-shot / Hosted Environments” where ephemeral containers may hit transient SQLite locking due to persistence features that are unnecessary for one-request-per-container workflows.
Changes:
- Document
EnableSessionStore/enable_session_store/enableSessionStorein the SessionConfig option lists (where applicable). - Add a One-shot / Hosted Environments section to each language README with examples disabling both session store and infinite sessions.
- Clarify mode-dependent defaults (runtime default in “CLI” modes when unset; SDK-defaulted off in “Empty” mode).
Show a summary per file
| File | Description |
|---|---|
| rust/README.md | Adds enable_session_store guidance + one-shot section and Rust example. |
| python/README.md | Documents enable_session_store and adds one-shot section with async example. |
| nodejs/README.md | Documents enableSessionStore and adds one-shot section with TS example. |
| java/README.md | Adds one-shot section with Java SessionConfig example. |
| go/README.md | Documents EnableSessionStore and adds one-shot section with Go example. |
| dotnet/README.md | Documents EnableSessionStore and adds one-shot section with C# example. |
Review details
- Files reviewed: 6/6 changed files
- Comments generated: 3
- Review effort level: Low
| - `streaming` (bool): Enable streaming delta events | ||
| - `provider` (ProviderConfig): Custom API provider configuration (BYOK). See [Custom Providers](#custom-providers) section. | ||
| - `infinite_sessions` (InfiniteSessionConfig): Automatic context compaction configuration | ||
| - `enable_session_store` (bool): Enables the cross-session store for search and retrieval across sessions. When unset in `"copilot-cli"` mode, the runtime default applies (enabled). In `"empty"` mode, defaults to disabled. See [One-shot / Hosted Environments](#one-shot--hosted-environments). |
|
|
||
| The CLI emits `session.compaction_start` / `session.compaction_complete` events around each compaction. The session id remains stable across compactions; resume with `Client::resume_session` to pick up a prior conversation. Workspace state lives under `~/.copilot/session-state/{sessionId}` by default — override with `workspace_path` to relocate. | ||
|
|
||
| `enable_session_store` on `SessionConfig` controls the cross-session store for search and retrieval across sessions. When unset in the default client mode, the runtime default applies (enabled). In empty mode, the SDK defaults it to disabled. |
| }); | ||
| ``` | ||
|
|
||
| In empty mode, the SDK already defaults `enable_session_store` to `false`; in the default client mode, you must set it explicitly. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Document
EnableSessionStorein SessionConfig README references and add a One-shot / Hosted Environments guidance section across all language SDK READMEs.Motivation
Users running one-shot hosted sessions (one request per container) can hit transient SQLite
database is lockederrors because the default session configuration enables SQLite-backed persistence features they typically do not need. Issue #1814 investigation identified thatEnableSessionStorewas undocumented in READMEs and there was no guidance for ephemeral environments.Fixes #1814
Changes
EnableSessionStore(or language equivalent) to SessionConfig property lists in dotnet, go, python, and nodejs READMEsenable_session_storeinline in rust READMEEnableSessionStoreand infinite sessionsCopilotClimode when unset; disabled by default inEmptymodeTests
Documentation-only change. Verified API examples against source (
Client.cs,mode_empty.go,_mode.py, etc.).Notes