The `~/.cursor/` data directory location on Remote SSH machines

Would be good to have the possibility of configuring the ~/.cursor/ data directory location on Remote SSH machines


Problem

When using Cursor with Remote SSH on a shared virtual machine, the agent runtime automatically creates and writes to ~/.cursor/ in the user’s home directory. This directory accumulates files over time - notably .plan.md files from agentic sessions, MCP server configs, agent memories, and rules.

On shared machines, /home/username/ is typically subject to disk quota policies. Once the quota is hit, Cursor Agent stops functioning correctly:

  • Cannot save MCP server configurations (~/.cursor/mcp.json)
  • Cannot create sub-agents or persist agent context
  • Agentic features break silently or with cryptic errors

This makes you as user of Cursor Agent to lose time in finding workarounds on shared infrastructure — not because of a network or permission issue, but simply because there is no way to tell Cursor to write its data somewhere other than ~/.


Root cause

This is separate from ~/.cursor-server/, which can already be redirected via cursor.serverInstallFolderPath in settings. The ~/.cursor/ directory — which contains agent runtime data — has no equivalent configuration and appears to be hardcoded in the client.


Expected behavior

Users should be able to redirect ~/.cursor/ to a path outside their home directory (e.g. /data/username/.cursor/ or a project-local path) through one or more of the following mechanisms:

  1. Environment variable — e.g. CURSOR_DATA_DIR=/custom/path, respected by both the client and remote agent
  2. settings.json config key — e.g. "cursor.dataDir": "/custom/path"
  3. Per-workspace scoping — agent plans, memories, and MCP config optionally scoped to the workspace root instead of ~/

Any one of these would unblock the use case.


Precedent in other IDEs

This is not an exotic request — other major IDEs already handle it:

  • code-server (open-source VS Code): respects $XDG_DATA_HOME to relocate all data out of ~/
  • JetBrains Gateway: since v2022.1, allows selecting a custom remote path for the IDE backend, explicitly for cases where the default directory lacks space
  • VS Code: has an open issue since 2019 requesting XDG compliance (#78026 and #162712) — the community has been asking for this for years

Cursor is currently the only major IDE with Remote SSH support that offers no mechanism to redirect agent data. This is a regression compared to the ecosystem.


Environment

  • Cursor version: 3.3.27
  • Remote: Linux VM shared among multiple users
  • Home directory under disk quota
  • Features broken: MCP custom servers, sub-agents, agentic sessions

A possible workaround

A symlink (ln -s /other/path ~/.cursor) works partially but requires admin intervention on shared machines, is fragile, and does not solve the problem for teams or multi-user environments.