# Denied and Sensitive Paths

Paths no prompt can approve, the read-only Agenvoy directory, and sensitive files that ask before they are touched.

## Permanent denials

`denied_path` in `config.json` is a hard denylist: those paths are off limits for both reads and writes, cannot be approved by any prompt, and retrying the same path fails the same way. Since v1.4.0 a built-in list (`configs/jsons/denied_path.json`, 22 entries) is always merged in, so the store and the Telegram and Discord credentials under `~/.config/agenvoy` (`.store`, `.telegram`, `.discord`), plus browser profiles, mail and password stores, keyrings and AI CLI credentials stay off limits even with an empty user list; Agenvoy itself reads them in-process, without the sandbox. Since v1.5.0 `.secrets`, `daemon.sock`, `runtime.uid`, `allow_tool`, `trust_skill`, `allow_skill`, `crons.json` and `tasks.json` are no longer on that list (script fallbacks and the daemon need them); they fall under the read-only rule below instead, and `.secrets` still matches the sensitive set, so reading it asks first. Entries must be absolute or start with `~/`; the filesystem root is refused. The path rules load before the rest of `config.json`, so they still hold when that file is corrupt; the TUI then asks whether to reset it (`y` renames it to `config.json.corrupt` and writes a fresh initial config, any other answer exits), and `agen -p` exits with an error.

Since v1.5.0 the rest of `~/.config/agenvoy` is read-only for the agent: the file tools can read it, but `write_file` (including `mode=remove`), `restore_file`, `download_file`, `generate_image`, `generate_audio`, `rm`, `write_paths` and the sandbox (macOS `deny file-write*`, Linux read-only binds) refuse to write, move or remove anything there, and no prompt can approve it. The deepest rule wins, so only `~/.config/agenvoy/download` (`configs/jsons/writable_path.json`) stays writable; neither list is configurable. Agenvoy's own writes (`write_skill`, `write_tool`, `write_hook`, configuration) run in-process, outside the sandbox and these checks, so a sandboxed command cannot edit `mcp.json`, `config.json`, hooks or the permission lists to widen its own gates. `denied_command` is its command-side equivalent — a binary on it is rejected outright, inside `sh -c` as well.

## Sensitive file guard

Files matching the sensitive set — SSH keys, `.pem`, `.key`, `.env`, and credential files — are restricted for both reads and writes: `read_files`, `write_file` (including `mode=remove`; `remove_file` was merged into it, Removed in v1.5.0), `restore_file`, `open_file`, `find_files`, and `file_history` raise a confirmation before touching them — a plain one inside `$HOME`, the password-backed one outside it. Since v1.3.7 the set also covers the `.git` and `.claude` directories, the shell startup files (`.bashrc`, `.bash_profile`, `.profile`, `.zshrc`, `.zprofile`, `.zshenv`, `.zlogin`) and `.mcp.json`, so reading `.git/config` or `~/.zshrc` with `read_files` now asks, and a read-only allowlist command whose argv touches one of them stops matching. The set is `sensitive_path` (`dirs` / `files` / `prefixes` / `extensions`), built into go-pkg `filesystem` since v1.3.10 (previously `configs/jsons/sensitive_path.json`) and extended by any user entries in `config.json`. This guard is enforced in Go, not by prompt.
