Skip to content

feat(cli): expand Cursor host mounts, Sandcat-controlled CLI config, and workspace isolation#71

Draft
wiacekm wants to merge 3 commits into
VirtusLab:masterfrom
wiacekm:add-missing-cursor-configuration-folders
Draft

feat(cli): expand Cursor host mounts, Sandcat-controlled CLI config, and workspace isolation#71
wiacekm wants to merge 3 commits into
VirtusLab:masterfrom
wiacekm:add-missing-cursor-configuration-folders

Conversation

@wiacekm

@wiacekm wiacekm commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Align Sandcat devcontainers with Cursor CLI host configuration: mount shared customization from ~/.cursor/, persist this sandbox's runtime state without leaking other workspaces, and manage Cursor CLI keys through Sandcat settings instead of bind-mounting cli-config.json.

  • Mount additional Cursor host paths when SANDCAT_MOUNT_CURSOR_CONFIG=true: commands/, hooks.json, hooks/, agents/, and mcp.json (read-only), alongside existing AGENTS.md, rules/, and skills/
  • Pre-create missing host bind sources on sandcat init (directories via mkdir, JSON files with minimal valid defaults) so Docker mounts files instead of root-owned empty directories
  • Add Sandcat-controlled Cursor CLI config via cursor.cli in settings: mitmproxy merges settings layers, writes /mitmproxy-config/cursor-cli-config.json, and the agent deep-merges that fragment into cli-config.json in agent-home on startup (Sandcat keys win; Cursor-managed keys persist in the volume). Default cursor.cli.network.useHttp1ForAgent: true for mitmproxy stability
  • Scope runtime state to the current workspace only: mount ~/.cursor/projects/workspaces-<project-name>/ read-write; keep chats/, plugins/, and subagents/ in agent-home so other workspaces' Cursor data is not exposed
  • Document optional volume mount customization (all-or-nothing init flags, per-path compose editing, Claude vs Cursor path tables, isolation notes)

Test plan

  • cd cli && bats test/agents/agents.bats test/composefile/composefile.bats test/init/init.bats test/init/regression.bats test/init/user_settings.bats
  • cd cli && pytest test/mitmproxy/test_mitmproxy_addon.py -k cursor_cli
  • sandcat init --agent cursor --name myproject and verify compose mounts only projects/workspaces-myproject/
  • Rebuild devcontainer; confirm host ~/.cursor/rules/ etc. appear read-only in the agent
  • Confirm cli-config.json in agent-home receives useHttp1ForAgent from Sandcat settings without a host bind mount
  • Confirm agent cannot list other workspaces under ~/.cursor/projects/ or access host chats/, plugins/, subagents/

Michał Wiącek and others added 3 commits June 22, 2026 06:12
Expose Cursor commands, hooks, and agents paths in container mounts and align docs/tests with the expanded Cursor host config behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
Extend SANDCAT_MOUNT_CURSOR_CONFIG with read-write host mounts for cli-config.json,
projects/, chats/, plugins/, and subagents/, plus read-only mcp.json. Pre-create
missing bind sources on init with minimal JSON defaults so Docker mounts files
instead of root-owned directories, and treat empty cli-config.json as unset during
container bootstrap.
Mount only ~/.cursor/projects/workspaces-<project-name>/ instead of the
entire host projects/, chats/, plugins/, and subagents/ trees so sandcat
agents cannot read other workspaces' Cursor runtime state. chats/,
plugins/, and subagents/ persist in agent-home; shared customization
mounts stay read-only.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant