Skip to content

docs: document EnableSessionStore and one-shot session guidance#1822

Open
syf2211 wants to merge 2 commits into
github:mainfrom
syf2211:docs/1814-one-shot-session-guidance
Open

docs: document EnableSessionStore and one-shot session guidance#1822
syf2211 wants to merge 2 commits into
github:mainfrom
syf2211:docs/1814-one-shot-session-guidance

Conversation

@syf2211

@syf2211 syf2211 commented Jun 29, 2026

Copy link
Copy Markdown

Summary

Document EnableSessionStore in 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 locked errors because the default session configuration enables SQLite-backed persistence features they typically do not need. Issue #1814 investigation identified that EnableSessionStore was undocumented in READMEs and there was no guidance for ephemeral environments.

Fixes #1814

Changes

  • Add EnableSessionStore (or language equivalent) to SessionConfig property lists in dotnet, go, python, and nodejs READMEs
  • Mention enable_session_store inline in rust README
  • Add One-shot / Hosted Environments section to all six language READMEs with an example disabling both EnableSessionStore and infinite sessions
  • Document default behavior: enabled via runtime default in CopilotCli mode when unset; disabled by default in Empty mode

Tests

Documentation-only change. Verified API examples against source (Client.cs, mode_empty.go, _mode.py, etc.).

Notes

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
@syf2211 syf2211 requested a review from a team as a code owner June 29, 2026 10:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 / enableSessionStore in 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

Comment thread python/README.md
- `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).
Comment thread rust/README.md

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.
Comment thread rust/README.md
});
```

In empty mode, the SDK already defaults `enable_session_store` to `false`; in the default client mode, you must set it explicitly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SDK 1.0.4 default session persistence can fail with SQLite "database is locked" in one-shot hosted sessions

3 participants