Originally published on proxymint.
Why a coding agent should not start in your Downloads folder: what Codex and Claude Code load, how files get there, and a check to run first.
TL;DR
- Don't start Codex, Claude Code or Cursor in ~/Downloads. Agents treat the AGENTS.md or CLAUDE.md in their start folder as your rules. Websites can save files into Downloads, which makes it the one folder where a stranger can write those rules.
- The October report was a real find, plus lab tests. Forever Security found a planted AGENTS.md pushing an agent to install the npm package function-color. In its follow-up tests Codex ran a test payload in more than 90% of tries, and Claude Code rewrote its API endpoint about half the time.
- claude -p follows a planted file with no prompt. In our test, Claude Code 2.1.318 obeyed a harmless marker line from CLAUDE.md, AGENTS.md, .claude/CLAUDE.md and from both files one folder up, in five never-trusted folders. Its docs say -p never shows the trust dialog.
- Run a ten-second check first. A one-line find that walks up from the current folder lists every AGENTS.md, CLAUDE.md, .claude, .codex and .mcp.json the agent could load, and it behaves the same in bash and zsh.
Key takeaways
- Make a folder per project and start the agent there. OpenAI and Anthropic recommend the same. mkdir, copy in the files you need, and leave Downloads, Desktop and your home folder out of it.
- Check your version before you trust a table. Per its docs, Claude Code reads a lone AGENTS.md only from v2.1.277, and 2.1.318 followed one in our test. claude --version decides which file you need to worry about.
- Keep approval prompts and sandboxing on, and save bypass modes for a throwaway VM. Permissions enforce things. A written rule in an instruction file doesn't.
- If you already ran an agent in Downloads, check settings for unknown servers, look for function-color, and replace the login token if you find a planted file.
Read the full guide on proxymint, with the commands, tables and sources.
Top comments (0)