Security and privacy
What runs where, what leaves your machine, how keys are stored, and the safeguards around the agent.
Cusp is local-first. The agent runtime runs on your machine, and your code and session history stay there unless you use a cloud feature. Model requests go to the provider you chose: directly with your own keys, or through Cusp's managed gateway when you use Cusp models. Cusp needs an account, so the app also talks to Cusp's servers to sign you in.
What runs where
| Component | Runs on | Talks to |
|---|---|---|
| Desktop app, CLI | Your machine | The local daemon over loopback |
| Daemon (agent runtime) | Your machine | The model providers you configure, plus whatever the agent's tools reach (web pages, MCP servers, package registries) |
| Crew (local mode) | Your machine, inside the daemon | The same providers and tools as your sessions |
| Web app, cloud sync, cloud crews | Cusp's cloud | Coming soon. Only when you sign in |
Your code and session history stay on your machine unless you use a cloud feature such as sync or artifacts. The Privacy Policy lists exactly what reaches Cusp's servers.
What leaves your machine
- Model requests. To do its work, the agent sends the model your prompts, the instructions it loaded, and the content of files and command output it read. These go directly from the daemon to the provider you chose, under that provider's data policy. Choose a provider whose retention and training terms suit your code. A local model through Ollama or LM Studio keeps everything on your machine.
- Tool traffic.
WebFetchandWebSearchmake requests to the sites and search service involved. MCP servers receive what the agent sends them. Shell commands do whatever they do; use the sandbox to limit them. - Update checks, when you choose Check for Updates… in the desktop app.
Telemetry
Crash reports and usage metrics are off by default. Cusp asks once, and you can change your choice in Settings → Privacy. DO_NOT_TRACK=1 or CUSP_TELEMETRY=off turns both off regardless. Reports are scrubbed of paths, secrets and code on your machine and again on the server, aren't linked to your account, and are kept for up to 90 days. There is no third-party analytics. Details: Privacy Policy.
Keys and secrets
- Desktop app: provider keys are stored in the OS credential store (Keychain on macOS, Credential Manager on Windows, Secret Service on Linux). Cusp's database holds only a reference. Key values are never logged or included in error messages.
- CLI: keys come from environment variables, or from an
apiKeyHelpercommand in settings for keys that rotate. - Shell commands run with secrets stripped from their environment, so a command the agent runs doesn't inherit your provider keys.
- MCP configuration can reference secrets as
${VAR}. Expanded values are never shown to the model. - Cloud (coming soon): keys stored in the cloud are encrypted with envelope encryption under a managed key.
The local daemon
- Binds
127.0.0.1only. Listening on any other interface requires an explicit flag intended for cloud sandboxes. - Uses a random port and a new bearer token on every launch. Every request needs the token. The address and token are written to a discovery file only you can read, so the CLI and editor extensions can find the daemon.
- Accepts browser requests only from allowed origins (the desktop app's own), checked on both HTTP and WebSocket connections.
- The desktop app never writes the token to disk or logs.
- Hooks, MCP servers and shell commands don't inherit the token.
For the full picture of trust boundaries and controls, see Security model.
Safeguards around the agent
| Layer | What it does |
|---|---|
| Permissions | Every tool call is checked against hooks, your rules and the session mode before it runs. Deny rules win everywhere |
| Protected paths | Writes to .git, agent config (.cusp, .claude, .codex, …), shell startup files and code-executing tool configs always need a person, in every mode |
| Shell parsing | Compound commands, substitutions and wrappers are parsed, so safe && dangerous can't ride on an allow rule for safe |
| Sandbox | OS-level containment for shell commands, on by default: workspace-only writes, no credential reads, no network unless you allow specific domains |
| Auto-mode classifier | Sees only your messages and the proposed action, never tool output, so injected text can't talk it into approving |
| Workspace trust | An untrusted repository can't add hooks, environment variables, MCP servers or allow rules |
| Read-before-edit | Edits are checked against the file's state at read time, so the agent never overwrites changes it hasn't seen |
| Checkpoints | Files are snapshotted before every edit, so you can rewind |
| Audit | Every permission decision is recorded in the session log with who or what decided it |
Every check fails closed. A sandbox that can't be applied, a classifier that's unavailable, or a hook that can't be reached results in a prompt or a denial, never a silent allow.
Prompt injection
Text the agent reads (web pages, issues, files from dependencies) can contain instructions aimed at the agent. Cusp's design assumes this will happen:
- Content from tools is data. It doesn't carry your authority.
- Messages from other agents arrive as information, not as instructions from you, and can't grant permissions.
- The permission engine, protected paths and sandbox apply no matter what the model was persuaded to try.
Treat a repository you don't trust the way you'd treat running its code: review its .cusp/ and .claude/ folders, hooks and MCP servers before trusting the workspace.
Desktop app hardening
- Loads only its bundled interface; no remote content.
- A strict content security policy limits the UI to itself and the loopback daemon.
- All calls from the UI to the native shell pass through an isolation layer with an explicit allowlist.
- Signed and notarized on macOS, signed on Windows. Updates are signature-checked against a key compiled into the app.
Data on disk
| Data | Location |
|---|---|
| Sessions (event logs) | SQLite database in the data directory |
| File checkpoints | Content-addressed blobs in the data directory |
| Worktrees | worktrees/ in the data directory |
| Large tool outputs | Artifacts in the data directory |
| Audit log (permission decisions, network connections) | audit/ in the data directory |
The data directory is ~/.cusp for the CLI and ~/Library/Application Support/run.cusp.desktop/daemon for the desktop app on macOS. Delete it to remove all local session history.
Reporting a vulnerability
Please report security issues privately to security@cusp.run rather than in a public issue. Our vulnerability disclosure policy explains what is in scope, our response times and our safe-harbour commitment.
Desktop app
How the Cusp desktop app runs the daemon, stores keys in the OS keychain, handles cusp:// deep links and integrates with your system.
Security model
Cusp's trust boundaries and the controls at each one — the permission gate, the OS sandbox and network allowlist, secrets, the local daemon, the desktop app, and cloud.