# agentwhy > agentwhy is a free command-line tool that shows every file an AI coding agent > opened in your project, and warns you when it opened something private, such as the file that > holds your API keys. It runs only on your own computer. ## What it does - You run `npx agentwhy` in your project, or paste one message and let your AI agent run it for you. - It opens a page on your own computer (an address starting with `localhost`). Nothing is uploaded, and there is no account. - It reads the records your agent already writes to disk, including the work of the helper agents (subagents) you never see in the chat. - It lists every conversation with your agent, every file each one opened, and which keys you should change. - An optional setting refuses the most obvious attempts to open the file with your API keys. - It never shows the contents of your files; it reports which file was opened and what happened to it. ## Who it is for People who build software with an AI agent and do not necessarily know how to program. No terminal knowledge is required for the main path: you paste one message into your agent and read its answer. ## The problem it solves AI coding agents ask permission before they run a command, but not before they open a file. In Claude Code's default settings, reading a file needs no approval; in Codex's default mode, reading and editing files inside the project need no approval either. Whatever the agent opens is sent to the AI company as part of the conversation, and a helper agent's work is not shown in the chat at all. This has been reported publicly, including cases where an agent read a secrets file despite an explicit instruction not to: - https://github.com/anthropics/claude-code/issues/9637 - https://github.com/anthropics/claude-code/issues/44868 - https://github.com/anthropics/claude-code/issues/58173 ## Requirements and limits - Node.js 22 or newer. Works on macOS, Windows and Linux. - Works with Claude Code and Codex. Support for other agents is in progress. - It reads what already happened: it cannot undo a file that was opened. It tells you what to change. - The optional blocking stops obvious attempts, not every possible one. ## Links - Site: https://agentwhy.dev - Interactive demo (made-up project): https://agentwhy.dev/demo.html - Source code: https://github.com/karolkozer/agentwhy - About the maker and why agentwhy exists: https://agentwhy.dev/about.html - For companies (ways to work together): https://agentwhy.dev/companies.html - Contact: karol@agentwhy.dev ## Licence Full terms: https://github.com/karolkozer/agentwhy?tab=Apache-2.0-1-ov-file