Skip to main content

0007: Per-folder workspace trust gating code execution

  • Status: Proposed (implemented in the MVP)
  • Date: 2026-12-05

Context​

Opening a folder must be safe. Language servers and build tools frequently execute project code (rust-analyzer runs build scripts and procedural macros).

Decision​

  • Folders are restricted by default. Restricted folders are fully editable and highlighted; anything that can run workspace-controlled code (today: language servers) is disabled.
  • Trust is granted explicitly per folder by the user and stored in the user's config directory. Subfolders inherit trust. Revoking trust stops services immediately.
  • IDE configuration, profiles and extensions are never read from the workspace.

Alternatives considered​

  • Trust everything (common in editors): convenient, unsafe for cloned repositories.
  • Per-feature prompts: more granular but noisy; can be layered on later for tasks and extensions.

Consequences​

  • First use of Rust semantics needs one click.
  • A trusted folder can still run arbitrary code through its tools; trust is a decision, not a sandbox.

Validation​

Session tests: no server starts in a restricted folder; trusting starts it; revoking stops it and clears diagnostics; files outside the folder never start servers.