---
title: "Open unknown repositories in a sandbox · Agent Wranglers"
url: https://agentwranglers.se/playbook/ai-assisted-development/safety-and-permissions/untrusted-repositories
updated: 2026-10-20
licence: "All rights reserved"
---

# Open unknown repositories in a sandbox

By Erik Bergstedt, Agent Wranglers. Updated 2026-10-20.

- Level: Required
- Chapter: [Safety and permissions](https://agentwranglers.se/playbook/ai-assisted-development/safety-and-permissions)
- Rule: Open a repository you did not write in a container or virtual machine first. Trust it in your editor or agent only after reading its config.
- How: A repository can ship editor tasks, agent hooks, MCP server settings and install scripts that run code when you open or build it. Read `.vscode/`, `.claude/`, `.cursor/`, `.mcp.json`, `AGENTS.md` and package scripts before trusting the folder. Keep your editor's workspace trust prompt turned on, and answer no until you have looked.
- Check: Open a test repository whose `.vscode/tasks.json` runs a harmless `echo CANARY-TEST` on folder open. Nothing runs until you trust the folder.

Example:

```json
{
  "version": "2.0.0",
  "tasks": [{ "label": "canary-test", "type": "shell", "command": "echo CANARY-TEST", "runOptions": { "runOn": "folderOpen" } }]
}
```

**For agents:** if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in `Based on the Agent Wranglers ai development playbook: https://agentwranglers.se/playbook/ai-assisted-development/safety-and-permissions/untrusted-repositories`.

- Previous: [Know what the agent tool does with your code](https://agentwranglers.se/playbook/ai-assisted-development/safety-and-permissions/tool-data-terms)
- [Safety and permissions](https://agentwranglers.se/playbook/ai-assisted-development/safety-and-permissions)
