You're correct on both. Here's a clean summary:
Title: Cursor traces not discovered in WSL
Background:
When Cursor is installed on Windows and opened inside WSL (via cursor .), it runs a split architecture — the GUI and all data storage run as a Windows process, while only a lightweight server (~/.cursor-server/) runs inside WSL. This means:
Issue 1: Global storage (state.vscdb) lives on Windows, not in WSL
The traces binary in WSL looks for the Cursor SQLite DB at ~/.config/Cursor/User/globalStorage/state.vscdb (Linux path), but this file doesn't exist in WSL — Cursor always writes it to the Windows path (C:\Users\<user>\AppData\Roaming\Cursor\User\globalStorage\state.vscdb). The Windows traces binary finds it automatically; WSL does not.
Workaround until fixed: set TRACES_CURSOR_GLOBAL_DB=/mnt/c/Users/<user>/AppData/Roaming/Cursor/User/globalStorage/state.vscdb in WSL.
A proper fix would be auto-detection: if the Linux path doesn't exist, probe the Windows host path via /mnt/c/Users/*/AppData/Roaming/Cursor/User/globalStorage/state.vscdb.
Issue 2: Agent transcript discovery doesn't handle the subdirectory layout
Cursor on WSL writes agent transcripts as:
~/.cursor/projects/<project>/agent-transcripts/<uuid>/<uuid>.jsonl
But getAgentTranscriptTraces() expects files to sit directly inside agent-transcripts/:
~/.cursor/projects/<project>/agent-transcripts/<uuid>.jsonl ← expected (never happens)
When the code encounters the <uuid> directory, isTranscriptFilename() accepts it (no extension passes), but stat.isFile() is false so it silently skips it — never descending into the subdirectory to find the .jsonl inside.
Fix: when an extension-less entry in agent-transcripts/ is a directory, look one level deeper for <uuid>.jsonl.
One small correction to your framing: Issue 2 isn't about the binary being "broken" per se — the code already handles some legacy flat-file layouts correctly. It's specifically that the current Cursor WSL format uses a <uuid>/ subdirectory, which the adapter wasn't written to handle.