Skip to content

[Bug] Support Copilot CLI 1.0.34 session-state DB schema (session-store.db no longer present) #3

Closed

Description

@mpowelltech

Describe the bug
auto-memory appears incompatible with the current Copilot CLI storage format on my machine. session-recall expects a database at ~/.copilot/session-store.db, but that file is not created. A newer Copilot DB exists under ~/.copilot/session-state/.../session.db, but it does not contain the tables auto-memory expects.

To reproduce
Steps to reproduce:

  1. Install auto-memory 0.1.0 (uv tool install --force --editable . from repo root).
  2. Run session-recall health.
  3. Run session-recall schema-check.
  4. Observe missing database error for ~/.copilot/session-store.db.
  5. (Optional) Point SESSION_RECALL_DB to ~/.copilot/session-state//session.db and run session-recall schema-check.
  6. Observe schema drift/missing expected tables.

Expected behavior
session-recall should find the active Copilot session database and return valid health/schema results, or document and handle the current Copilot CLI DB layout.

Actual behavior
session-recall health and session-recall schema-check fail against default path with:
error: database not found: /Users/username/.copilot/session-store.db
When SESSION_RECALL_DB is set to the discovered Copilot DB path, schema-check reports missing tables:
sessions, turns, session_files, session_refs, checkpoints

Environment

  • OS: macOS 15.7.3 (24G419)
  • Python version: 3.10.10
  • auto-memory version: 0.1.0
  • Copilot CLI version: 1.0.34

session-recall health output

error: database not found: /Users/username/.copilot/session-store.db
error: database not found: /Users/username/.copilot/session-store.db
EXIT:4

Additional context
Found Copilot DB at: /Users/username/.copilot/session-state//session.db
Running health with SESSION_RECALL_DB set to that path exits 0 but reports RED schema integrity and no such table: sessions.
sqlite tables in that DB are only: todo_deps, todos.
This suggests a Copilot CLI schema/storage change that auto-memory may not yet support.

Activity

  1. dezgit2025 commented on Apr 22, 2026

    @dezgit2025
    Owner

    I think there selection mode where the db is stored when you start. i think you need to pick global user location like ~/.copilot/session-store.db.. the only way i think it might reprompt you i don't see ms docs. is if you close copilot cli and temporailry move the current db. it should recreate a new one. This is just suggestions since there no official docs i can find on ms docs about chaning session db locations.

  2. dezgit2025 commented on Apr 22, 2026

    @dezgit2025
    Owner

    what os are you running windows?

  3. mpowelltech commented on Apr 22, 2026

    @mpowelltech
    Author

    Running macOS.

    I ran the pip install command and it showed success, then ran the session-recall health which immediately failed saying the db didn’t exist. Pointed copilot at the deploy/install.md file too with no success.

    There was no selection mode option when installing this or copilot cli. They both just installed with no further setup prompt.

  4. BrttClne22 commented on Apr 22, 2026

    @BrttClne22

    I'm having the same issue on Windows 11 pro I believe the CLI version is 1.0.34. I can check when I get home

  5. hmawla commented on Apr 23, 2026

    @hmawla

    I think you should run /experimental on in copilot to enable the use and creation of session-store.db file.
    This enables experimental features, including:
    SESSION_STORE - Enable SQLite-based session store for cross-session history, file tracking, and search

  6. sc-rsayad commented on Apr 23, 2026

    @sc-rsayad

    I think you should run /experimental on in copilot to enable the use and creation of session-store.db file. This enables experimental features, including: SESSION_STORE - Enable SQLite-based session store for cross-session history, file tracking, and search

    Why isn't this mentioned at all in the README , Thanks this may work.

  7. lab34 commented on Apr 23, 2026

    @lab34

    I think you should run /experimental on in copilot to enable the use and creation of session-store.db file. This enables experimental features, including: SESSION_STORE - Enable SQLite-based session store for cross-session history, file tracking, and search

    Perfect !
    This solve my problem of "error: database not found: /home/username/.copilot/session-store.db" on W11 + WSL2 + CLI 1.0.34

  8. jshessen commented on Apr 23, 2026

    @jshessen
    Contributor

    I think the use of /experimental is certainly useful.

    One of the challenges I was trying to address with #5 was the proliferation of where sessions can be stored across Copilot CLI (both methods JSONL and DB), VSCode etc. Depending upon where I initiate my session (CLI, IDE, Cloud), the storage container differs, but trying to pull it all back together in a useful way was the intent.

  9. dezgit2025 commented on Apr 23, 2026

    @dezgit2025
    Owner

    [hmawla] thanks added to README...

  10. dezgit2025 commented on Apr 23, 2026

    @dezgit2025
    Owner

    [jshessen].

    One of the challenges I was trying to address with #5 was the proliferation of where sessions can be stored across Copilot CLI (both methods JSONL and DB), VSCode etc. Depending upon where I initiate my session (CLI, IDE, Cloud), the storage container differs, but trying to pull it all back together in a useful way was the intent.

    The only issue i see is i would have to store the session in the Azure cloud. How many folks would do use Azure? it certainly not hard to do it Azure since copilot cli is understand Azure pretty well, let me create a poll in disucssion to gauge the interest... fair?

  11. dezgit2025 commented on Apr 23, 2026

    @dezgit2025
    Owner

    [jshessen]. are you running this muliple laptops? or in the cloud too? Trying to understand the use case.

  12. dezgit2025 commented on Apr 23, 2026

    @dezgit2025
    Owner

    i will follow up with MS Copilot CLI Team about this. /experimental flag issue db work around.

  13. jshessen commented on Apr 23, 2026

    @jshessen
    Contributor

    [jshessen].

    One of the challenges I was trying to address with #5 was the proliferation of where sessions can be stored across Copilot CLI (both methods JSONL and DB), VSCode etc. Depending upon where I initiate my session (CLI, IDE, Cloud), the storage container differs, but trying to pull it all back together in a useful way was the intent.

    The only issue i see is i would have to store the session in the Azure cloud. How many folks would do use Azure? it certainly not hard to do it Azure since copilot cli is understand Azure pretty well, let me create a poll in disucssion to gauge the interest... fair?

    this is a local machine -- where most engagements are made through a VS Code IDE ... in the default VS Code session scenario, these are written to
    ~/.config/Code/User/workspaceStorage/**/chatSessions/*.jsonl
    If I modify the selection away from a VS Code (aka Local) to say Copilot CLI the sessions are now being written to
    Image
    ~/.copilot/session-state/*/events.jsonl

    VS Code has been updated to read from both of these locations and show both session files in the Sessions sidebar

    Even if executed native with the Copilot CLI
    `[jshessen@Unity ~] $ copilot version
    GitHub Copilot CLI 1.0.34

    You are running the latest version.
    [jshessen@Unity ~] $ cd .copilot
    [jshessen@Unity .copilot] $ ls
    agents command-history-state.json.bak copilot-instructions.md logs scripts skills
    command-history-state.json config.json ide restart session-state
    [jshessen@Unity .copilot] $ cd session-state/
    [jshessen@Unity session-state] $ ls -la
    total 0
    drwx------. 1 jshessen jshessen 1368 Apr 22 14:11 .
    drwx------. 1 jshessen jshessen 272 Apr 22 16:21 ..
    drwx------. 1 jshessen jshessen 76 Apr 22 11:47 f22892c1-f9c1-4dee-8388-87d557ff8f04
    drwx------. 1 jshessen jshessen 140 Apr 14 14:27 f57bc62f-c52c-4d4b-aed2-bc2947a50618
    [jshessen@Unity session-state] $ `

  14. jshessen commented on Apr 23, 2026

    @jshessen
    Contributor

    here is a set of calls using this code base pulling from both interaction sets

    Step 1 — Schema check (all providers)

    session-recall schema-check --provider all
    ✅ Schema checks passed for active provider(s)
       - cli: OK (session-state-or-sqlite)
       - vscode: OK (file)

    cli reports session-state-or-sqlite because no session-store.db was found;
    it falls back to ~/.copilot/session-state/*/events.jsonl.


    Step 2 — Health check (provider-fallback mode)

    session-recall health --provider all --json
    {
      "overall_score": 10.0,
      "dims": [
        {
          "name": "SQLite Health Core",
          "zone": "CALIBRATING",
          "score": null,
          "detail": "session-store.db unavailable; running provider compatibility health",
          "hint": "Set SESSION_RECALL_DB if SQLite storage exists on this machine."
        },
        {
          "name": "Provider:cli",
          "zone": "GREEN",
          "score": 10.0,
          "detail": "13 recent sessions detected",
          "hint": ""
        },
        {
          "name": "Provider:vscode",
          "zone": "GREEN",
          "score": 10.0,
          "detail": "20 recent sessions detected",
          "hint": ""
        }
      ],
      "providers": ["cli", "vscode"],
      "storage_mode": "provider-fallback",
      "top_hints": [
        "Set SESSION_RECALL_DB if SQLite storage exists on this machine."
      ]
    }

    storage_mode: provider-fallback confirms SQLite is absent; both providers are
    GREEN with live session counts.


    Step 3 — Repository/workspace discovery

    session-recall repos --provider all
    Repository/Workspace                        Sessions  Last Seen   Providers
    ------------------------------------------------------------------------------------------
    unknown                                           49  2026-04-23  vscode
    jshessen/auto-memory                               2  2026-04-22  cli
    <user>/<other-repo>                                1  2026-04-22  cli

    Step 4 — Include local (non-GitHub) workspaces

    session-recall repos --provider all --include-local
    Repository/Workspace                        Sessions  Last Seen   Providers
    ------------------------------------------------------------------------------------------
    unknown                                           49  2026-04-23  vscode
    local:/home/<user>                                 5  2026-04-22  cli
    local:/home/<user>/.config/squad                   5  2026-04-22  cli
    jshessen/auto-memory                               2  2026-04-22  cli
    <user>/<other-repo>                                1  2026-04-22  cli

    Step 5 — List sessions (all providers, last 14 days)

    session-recall list --provider all --days 14 --limit 25
    ID        Date        Repository/Workspace          Turns  Summary
    ----------------------------------------------------------------------------------------------------
    vscode:5  2026-04-23  unknown                          32  I'm experiencing this issue based upon w
    vscode:8  2026-04-23  unknown                           0  2156b68e-8061-4dbc-9dab-f654d01efbb2.jso
    vscode:b  2026-04-22  unknown                           0  76cf01c5-cd38-42ca-a00c-a57cdce7a0ee.jso
    b43bfb6b  2026-04-22  local:/home/<user>/.config       29  can you fix the broken skills?
    edcb0ed2  2026-04-22  local:/home/<user>/.config       10  I exported an updated file,with the late
    vscode:8  2026-04-22  unknown                          10  there seems to be a discrepancy on where
    b15c112d  2026-04-22  local:/home/<user>/.config       10  from the ~/squad-export.json file
    52d6bb7c  2026-04-22  local:/home/<user>/.config        2  from the ~/squad-export.json file
    5deb602c  2026-04-22  jshessen/auto-memory              2  cast
    bdfa27c1  2026-04-22  jshessen/auto-memory              2  tell me about the squad
    vscode:c  2026-04-21  unknown                          34  [private]
    vscode:3  2026-04-21  unknown                           2  [private]
    vscode:c  2026-04-21  unknown                           0  e0b98561-de80-46db-a3ed-d1c41f04fcfa.jso
    vscode:4  2026-04-21  unknown                           1  [private]
    vscode:3  2026-04-21  unknown                           2  although I tend to use the SSM, part of
    vscode:3  2026-04-20  unknown                           4  [private]
    vscode:e  2026-04-20  unknown                          41  [private]
    vscode:a  2026-04-18  unknown                           3  [private]
    vscode:f  2026-04-17  unknown                           4  [private]
    vscode:b  2026-04-17  unknown                           2  [private]
    vscode:c  2026-04-14  unknown                           1  I feel like we need to clean up our lint
    vscode:6  2026-04-14  unknown                          71  [private]
    vscode:5  2026-04-14  unknown                           5  I would like to setup github copilot CLI
    vscode:f  2026-04-10  unknown                           3  [private]
    vscode:b  2026-04-10  unknown                           0  b2e3154e-99c4-4b82-a4f6-619627baed52.jso

    Step 6 — List (VS Code provider only)

    session-recall list --provider vscode --days 14 --limit 10
    ID        Date        Repository/Workspace          Turns  Summary
    ----------------------------------------------------------------------------------------------------
    vscode:5  2026-04-23  unknown                          32  I'm experiencing this issue based upon w
    vscode:8  2026-04-23  unknown                           0  2156b68e-8061-4dbc-9dab-f654d01efbb2.jso
    vscode:b  2026-04-22  unknown                           0  76cf01c5-cd38-42ca-a00c-a57cdce7a0ee.jso
    vscode:8  2026-04-22  unknown                          10  there seems to be a discrepancy on where
    vscode:c  2026-04-21  unknown                          34  [private]
    vscode:3  2026-04-21  unknown                           2  [private]
    vscode:c  2026-04-21  unknown                           0  e0b98561-de80-46db-a3ed-d1c41f04fcfa.jso
    vscode:4  2026-04-21  unknown                           1  [private]
    vscode:3  2026-04-21  unknown                           2  although I tend to use the SSM, part of
    vscode:3  2026-04-20  unknown                           4  [private]

    Step 7 — List (CLI provider only)

    session-recall list --provider cli --days 14 --limit 10
    ID        Date        Repository/Workspace          Turns  Summary
    ----------------------------------------------------------------------------------------------------
    b43bfb6b  2026-04-22  local:/home/<user>/.config       29  can you fix the broken skills?
    edcb0ed2  2026-04-22  local:/home/<user>/.config       10  I exported an updated file,with the late
    b15c112d  2026-04-22  local:/home/<user>/.config       10  from the ~/squad-export.json file
    52d6bb7c  2026-04-22  local:/home/<user>/.config        2  from the ~/squad-export.json file
    1dec319c  2026-04-22  local:/home/<user>/.config        1  status
    5deb602c  2026-04-22  jshessen/auto-memory              2  cast
    bdfa27c1  2026-04-22  jshessen/auto-memory              2  tell me about the squad
    b7f01fba  2026-04-22  <user>/<other-repo>               2  tell me about the squad
    babd24ea  2026-04-22  local:/home/<user>                5  import ~/squad-export.json
    10efd10e  2026-04-22  local:/home/<user>                9  pwd

    Step 8 — Cross-provider search term frequency

    Find terms with hits in both providers to use for the comparison in steps 9–11.

    python3 -c "
    import json, subprocess
    terms = ['memory', 'session', 'repo', 'copilot', 'auto-memory', 'health', 'schema']
    for t in terms:
        counts = {}
        for p in ('vscode', 'cli'):
            out = subprocess.check_output(
                ['session-recall', 'search', t, '--provider', p, '--days', '30', '--json'],
                text=True
            )
            counts[p] = json.loads(out).get('count', 0)
        print(f'{t:12s} vscode={counts[\"vscode\"]:3d} cli={counts[\"cli\"]:3d}')
    "
    memory       vscode=  5 cli=  2
    session      vscode=  5 cli=  1
    repo         vscode=  5 cli=  5
    copilot      vscode=  5 cli=  1
    auto-memory  vscode=  5 cli=  1
    health       vscode=  5 cli=  0

    repo has the highest combined hit rate — use it for the search comparison below.


    Step 9 — Search: VS Code provider

    session-recall search repo --provider vscode --days 30 --json
    {
      "query": "repo",
      "repo": "jshessen/auto-memory",
      "count": 5,
      "results": [
        {
          "provider": "vscode",
          "session_id": "vscode:5",
          "session_id_full": "vscode:5564...ea04",
          "source_type": "turn",
          "summary": "I'm experiencing this issue based upon where memory lives depending upon the way AI is being called:",
          "repository": "unknown",
          "date": "2026-04-23",
          "content": "..."
        },
        {
          "provider": "vscode",
          "session_id": "vscode:5",
          "source_type": "turn",
          "summary": "I'm experiencing this issue based upon where memory lives depending upon the way AI is being called:",
          "repository": "unknown",
          "date": "2026-04-23",
          "content": "2 would be useful ... as ideally we should be able to say show found session repositories like\n\nshared-memory repos\n"
        },
        {
          "provider": "vscode",
          "session_id": "vscode:5",
          "source_type": "turn",
          "date": "2026-04-23",
          "content": "so if i list repos ... i get a list, and if i\n"
        },
        {
          "provider": "vscode",
          "session_id": "vscode:5",
          "source_type": "turn",
          "date": "2026-04-23",
          "content": "so if i list repos ... i get a list, and if i ask for a list, i would have expected more in the list to align with the repos in structure and in counts\n\n(.venv) [jshessen@unity auto-memory] $ session-recall repos --include-local\n..."
        },
        {
          "provider": "vscode",
          "session_id": "vscode:5",
          "source_type": "turn",
          "date": "2026-04-23",
          "content": "can you please process to understand the intended benefits ... and ensure our code is not just \"finding\" session history, but using it correctly within the context of the intent of this repo?\n"
        }
      ]
    }

    All 5 hits are from session vscode:5 — the VS Code conversation where this feature was designed.


    Step 10 — Search: CLI provider

    session-recall search repo --provider cli --days 30 --json
    {
      "query": "repo",
      "repo": "all",
      "count": 5,
      "results": [
        {
          "provider": "cli",
          "session_id": "b43bfb6b",
          "source_type": "turn",
          "summary": "can you fix the broken skills?",
          "repository": "local:/home/<user>/.config/squad",
          "date": "2026-04-22",
          "content": "I've likely been fixing the wrong layer: `/skills` is probably reading the global skill store under `~/.copilot/skills`, not just this repo's `.squad/skills`. I'm checking that store for the same corruption now."
        },
        {
          "provider": "cli",
          "session_id": "b15c112d",
          "source_type": "turn",
          "summary": "from the ~/squad-export.json file",
          "repository": "local:/home/<user>/.config/squad",
          "date": "2026-04-22",
          "content": "<skill-context name=\"init-mode\">\nBase directory for this skill: ~/.copilot/skills/init-mode\n..."
        },
        {
          "provider": "cli",
          "session_id": "10efd10e",
          "source_type": "turn",
          "summary": "pwd",
          "repository": "local:/home/<user>",
          "date": "2026-04-22",
          "content": "<skill-context name=\"init-mode\">..."
        },
        {
          "provider": "cli",
          "session_id": "babd24ea",
          "source_type": "turn",
          "summary": "import ~/squad-export.json",
          "repository": "local:/home/<user>",
          "date": "2026-04-22",
          "content": "<skill-context name=\"init-mode\">..."
        },
        {
          "provider": "cli",
          "session_id": "3e3c38ce",
          "source_type": "turn",
          "summary": "init --global",
          "repository": "local:/home/<user>",
          "date": "2026-04-22",
          "content": "<skill-context name=\"init-mode\">..."
        }
      ]
    }

    5 hits across 4 distinct CLI sessions — all Squad CLI build work from local:/home/jshessen/.config/squad.


    Step 11 — Search: all providers combined

    session-recall search repo --provider all --repo all --days 30 --limit 10 --json
    {
      "query": "repo",
      "repo": "all",
      "count": 10,
      "results": [
        { "provider": "vscode", "session_id": "vscode:5", "date": "2026-04-23", "summary": "I'm experiencing this issue based upon where memory lives depending upon the way AI is being called:" },
        { "provider": "vscode", "session_id": "vscode:5", "date": "2026-04-23", "content": "2 would be useful ... shared-memory repos" },
        { "provider": "vscode", "session_id": "vscode:5", "date": "2026-04-23", "content": "so if i list repos ..." },
        { "provider": "vscode", "session_id": "vscode:5", "date": "2026-04-23", "content": "so if i list repos ... i would have expected more in the list ..." },
        { "provider": "vscode", "session_id": "vscode:5", "date": "2026-04-23", "content": "can you please process to understand the intended benefits ..." },
        { "provider": "cli", "session_id": "b43bfb6b", "date": "2026-04-22", "repository": "local:/home/<user>/.config/squad", "summary": "can you fix the broken skills?" },
        { "provider": "cli", "session_id": "b15c112d", "date": "2026-04-22", "repository": "local:/home/<user>/.config/squad", "summary": "from the ~/squad-export.json file" },
        { "provider": "cli", "session_id": "10efd10e", "date": "2026-04-22", "repository": "local:/home/<user>", "summary": "pwd" },
        { "provider": "cli", "session_id": "babd24ea", "date": "2026-04-22", "repository": "local:/home/<user>", "summary": "import ~/squad-export.json" },
        { "provider": "cli", "session_id": "3e3c38ce", "date": "2026-04-22", "repository": "local:/home/<user>", "summary": "init --global" }
      ]
    }

    --repo all disables the auto-detected repo filter so both VS Code and CLI sessions are
    returned together, sorted by date. Without it, --provider all auto-detects the current
    repo and scopes CLI sessions to only those tagged with the same repo — CLI sessions from
    other workspaces are filtered out.

  15. added 2 commits that reference this issue on Apr 28, 2026
    607d141
    b44cd3e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions