github/copilot-sdk · error · ValueError

SessionFs capabilities declare SQLite support but the…

Error message

SessionFs capabilities declare SQLite support but the provider does not implement SessionFsSqliteProvider

What it means

Interface-conformance check when wiring the session filesystem: the session_fs capabilities advertise SQLite support, but the supplied fs_provider class does not implement SessionFsSqliteProvider, so SQLite-backed operations would fail later. The SDK rejects the mismatch up front instead of letting capability negotiation succeed and calls break at runtime.

Solutions

  1. Provide a provider class that implements SessionFsSqliteProvider
  2. Remove the SQLite capability from the session_fs capabilities if SQLite is not needed
  3. Use the SDK's built-in SQLite provider instead of a custom implementation
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at python/copilot/client.py:2887 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of github/copilot-sdk@cd8cf15dc3 (2026-09-09). Data as JSON: /api/errors/c8ec8790a1d78642. Report an issue: GitHub.

Appendix: source

Thrown at python/copilot/client.py:2887

                    if github_token_provider_registration_id is None
                    else lambda: self._unregister_github_token_provider(
                        github_token_provider_registration_id
                    )
                ),
            )
            if self._session_fs_config:
                if create_session_fs_handler is None:
                    raise ValueError(
                        "create_session_fs_handler is required in session config when "
                        "session_fs is enabled in client options."
                    )
                fs_provider: SessionFsProvider = create_session_fs_handler(s)
                caps = self._session_fs_config.get("capabilities")
                if caps and caps.get("sqlite"):
                    from .session_fs_provider import SessionFsSqliteProvider

                    if not isinstance(fs_provider, SessionFsSqliteProvider):
                        raise ValueError(
                            "SessionFs capabilities declare SQLite support but the provider "
                            "does not implement SessionFsSqliteProvider"
                        )
                s._client_session_apis.session_fs = create_session_fs_adapter(fs_provider)
            s._register_tools(tools)
            s._register_commands(commands)
            s._register_permission_handler(on_permission_request)
            s._register_mcp_auth_handler(on_mcp_auth_request)
            if on_user_input_request:
                s._register_user_input_handler(on_user_input_request)
            if on_elicitation_request:
                s._register_elicitation_handler(on_elicitation_request)
            if on_exit_plan_mode_request:
                s._register_exit_plan_mode_handler(on_exit_plan_mode_request)
            if on_auto_mode_switch_request:
                s._register_auto_mode_switch_handler(on_auto_mode_switch_request)
            if canvas_handler is not None:
                s._register_canvas_handler(canvas_handler)

View on GitHub (pinned to cd8cf15dc3)