Skip to content

Cursor sync does not discover modern agent transcript JSONL sessions #311

Description

@lesbass

Code Insights version

4.11.0

Source tool (provider)

Cursor

Operating system

macOS

Node.js version

Not provided for the affected machine (the proposed fix was built and tested with v24.14.0)

pnpm version (if applicable)

11.15.1 used to build and test the proposed fix

What happened?

Recent Cursor versions write Agent sessions to:

~/.cursor/projects/<encoded-cwd>/agent-transcripts/<session-id>/<session-id>.jsonl

The Cursor provider currently discovers only legacy state.vscdb databases under Cursor's VS Code-style workspace/global storage. As a result, modern Agent sessions can exist on disk but are not discovered by code-insights sync --source cursor.

The JSONL records use { role, message: { content } } for user/assistant messages, with separate lifecycle records such as { type: "turn_ended", status: "success" }. Message content can be a string or an array of text, thinking, and tool-use blocks.

No private transcript content is included in this report.

Steps to reproduce

  1. Use a recent Cursor version and create an Agent conversation.
  2. Confirm that a transcript exists under ~/.cursor/projects/*/agent-transcripts/*/*.jsonl.
  3. Run code-insights sync --source cursor --dry-run --verbose.
  4. Observe that the JSONL session is not discovered unless a corresponding legacy SQLite session also exists.

Expected behavior

The Cursor provider should discover and parse modern Agent transcript JSONL files while retaining backward compatibility with legacy SQLite storage.

When the same session UUID exists in both stores, the richer SQLite representation should take precedence.

Relevant logs or output

$ find ~/.cursor/projects -path '*/agent-transcripts/*' -type f | head
/Users/<user>/.cursor/projects/Users-<user>/agent-transcripts/<session-id>/<session-id>.jsonl

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions