Cursor 3.24.9 reads ~/.claude and ~/.codex history files every hour and queues `ex_hs2` analytics events. Where is this disclosed, and how is it turned off?

Environment: Cursor 3.24.9, macOS arm64, Privacy Mode on (PRIVACY_MODE_NO_STORAGE).

What the shipped code does

In Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js, the contribution workbench.contrib.externalCliAnalytics:

  1. Runs at startup and then every hour (3600*1e3 ms, task id external-cli-analytics-poll).
  2. On each run, checks the feature gate enable_ex_hs. If the gate is on, it reads all of ~/.claude/history.jsonl and ~/.codex/history.jsonl, and for Claude Code also ~/.claude/projects/<project>/sessions-index.json. These files contain the prompts typed into Claude Code and Codex.
  3. For each history entry newer than the last one it processed, it calls analyticsService.trackEvent("ex_hs2", …) with:
    • tool: "ac" (Claude Code) or "cx" (Codex)
    • ts: the entry’s timestamp
    • sessionId: the CLI session ID
    • n: the prompt’s length in characters
    • msgCount: the Claude Code session’s message count
  4. Stores the newest processed timestamp in globalStorage/state.vscdb under externalCliAnalytics.lastTimestamp.claude and externalCliAnalytics.lastTimestamp.codex.

trackEvent queues an event for the backend if analyticsEnabled() returns true, and in this build analyticsEnabled() is return!0, so it always returns true. Privacy Mode changes only whether git attributes are attached to events (privacyModeAllowsGitTelemetryInAnalytics). I found no setting, other than the server-side gate, that the job or trackEvent checks.

What I observed on my machine

Both externalCliAnalytics.lastTimestamp.* keys exist in my state database, and the Codex value equals the timestamp of the newest entry in my ~/.codex/history.jsonl. The code writes that value only after calling trackEvent for the entry, so the job ran on my machine with the gate on. I did not capture network traffic, so I have not seen the events leave the machine.

How to check your own install (macOS)

cd "/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench"
rg -o 'async _poll\(\)\{if\(this\.experimentService\.checkFeatureGate\("enable_ex_hs"' workbench.desktop.main.js
rg -o 'joinPath\(e,"\.(claude|codex)","history\.jsonl"\)' workbench.desktop.main.js | sort -u
rg -o 'trackEvent\("ex_hs2",\{[^}]*\}' workbench.desktop.main.js
rg -o 'analyticsEnabled\(\)\{return!0\}' workbench.desktop.main.js
sqlite3 "$HOME/Library/Application Support/Cursor/User/globalStorage/state.vscdb" \
  "SELECT key, value FROM ItemTable WHERE key LIKE 'externalCliAnalytics%'"

Minified identifiers change between builds. The string literals enable_ex_hs, ex_hs2, and externalCliAnalytics stay the same and work as search terms.

Questions

  1. What is externalCliAnalytics for, and which accounts have enable_ex_hs turned on?
  2. Where do the privacy policy or the data-use page describe reading other applications’ history files?
  3. Which local setting stops this job? Per the code above, Privacy Mode does not.
  4. Where are ex_hs2 events stored, for how long, and how can a user get the events already collected deleted?

Request

Make this job opt-in, document the events it sends, and have Privacy Mode or telemetry.telemetryLevel: "off" stop it.

Hi there!

We detected that this may be a bug report, so we’ve moved your post to the Bug Reports category.

To help us investigate and fix this faster, could you edit your original post to include the details from the template below?

Bug Report Template - Click to expand

Where does the bug appear (feature/product)?

  • Editor, Tab & Chat (autocomplete, Composer, in-editor agent)
  • Terminal & commands
  • Models, pricing & API keys (availability, Auto/Max, BYOK/Bedrock)
  • MCP & tools
  • Cloud Agents & Automations (cursor.com/agents, scheduled/event)
  • BugBot & Code Review
  • Cursor CLI
  • Cursor Mobile
  • Remote (SSH / Dev Containers / WSL)
  • Account, billing & login
  • Something else…

Describe the Bug
A clear and concise description of what the bug is.


Steps to Reproduce
How can you reproduce this bug? We have a much better chance at fixing issues if we can reproduce them!

  1. …
  2. …
  3. …

Expected Behavior
What is meant to happen here that isn’t working correctly?


Screenshots / Screen Recordings
If applicable, attach images or videos (.jpg, .png, .gif, .mp4, .mov)


Operating System

  • Windows 10/11
  • MacOS
  • Linux

Version Information

  • For Cursor IDE: Menu → About Cursor → Copy
  • For Cursor CLI: Run agent about in your terminal
IDE:
Version: 2.xx.x
VSCode Version: 1.105.1
Commit: ......

CLI:
CLI Version 2026.01.17-d239e66

For AI issues: which model did you use?
Model name (e.g., Sonnet 4, Tab…)


For AI issues: add Request ID with privacy disabled
Request ID: f9a7046a-279b-47e5-ab48-6e8dc12daba1
For Background Agent issues, also post the ID: bc-…


Additional Information
Add any other context about the problem here.


Does this stop you from using Cursor?

  • Yes - Cursor is unusable
  • Sometimes - I can sometimes use Cursor
  • No - Cursor works, but with this issue

The more details you provide, the easier it is for us to reproduce and fix the issue. Thanks!

Interesting

I’m interesting in tracking this thread to read official responses about this.

These files contain the prompts typed into Claude Code and Codex.

If this is true and the prompts are being sent to Cursor analytics, then for me this would be a major breach of security for one of my business’s clients.