FAQ
Straight answers about agentwhy.
Short answers to what people ask first, including what agentwhy can't do.
Will it work for me?
Yes, if you build with an AI agent like Claude Code or Codex, on a Mac or on Windows. You don't need to know how to code. You paste one message into your agent, it runs agentwhy for you, and the answer opens as a page on your own computer, in plain words.
It does not work from an AI chat in your browser: a chat can't run anything on your computer.
Is it safe to run?
Yes. It runs only on your computer. There is no account and no sign-up, and nothing is sent anywhere. It shows which file was opened, never what is inside it. If a file holds API keys, the keys are left out before anything is saved, so they never appear in your report.
It found something. What do I do now?
Change the keys in the file it names, and nothing else. For each key, sign in to the service it belongs to, like your payments or AI account, open the page with your API keys and create a new one. Put the new key where the old one was, then delete the old key. Once it is deleted, whoever saw it can do nothing with it.
Each key takes a couple of minutes. Then tick the file off your list.
What if I paste an API key into a message?
agentwhy stops the message before your AI gets it. It tells you which key it found and on which line, and what to do instead: put the key in the file with your API keys, and write its name in your message.
This works in Claude Code and Codex, when agentwhy's warnings in your chat are on. It recognises the keys of common services by their shape. A key it doesn't recognise still goes through.
Some apps name a new chat from your first message, so that message may already have been sent. When that can happen, agentwhy says so, and you change the key.
Can it hide a key inside a file?
Yes, when hiding keys is on, as it is for a project you set up on agentwhy's welcome page. When your AI opens a file, agentwhy swaps each key it recognises for a stand-in before your AI sees it. The file on your computer doesn't change. Your AI is told a key was hidden, so it works around it.
It lowers the risk; it doesn't remove it. A key it doesn't recognise, part of a key, a key written in an unusual way, or a file you attach to a message still gets to your AI. So does a key in a step that fails, in Claude Code. Each step of your AI also takes about half a second longer.
Can't I just tell my agent not to open those files?
You can, and it is worth doing. But people keep reporting the same thing in public: they wrote a rule in their agent's instructions to stay away from the file with their keys, and it opened it anyway.
Telling your agent is a rule. agentwhy stops what it can, and shows you the rest.
What can't it do?
It tells you the same day, not months later when someone else is already using your key. But there are three things it can't do.
- It can't take a file back. Once your agent has opened a file, it is opened. agentwhy tells you which one, so you know what to change.
- Stopping is not a lock. Switched on, it stops the obvious attempts, like a direct request for the file with your API keys. Anything that slips past still shows up in your report, because the report reads what already happened.
- It only sees the agents it works with. Today that is Claude Code, Codex and GitHub Copilot. Work done in any other tool does not show up.
What can't it see?
agentwhy reads the saved records your agent keeps as it works. If your agent opens a file in a way those records don't spell out, agentwhy can miss it. For example, from inside a small program your agent writes and runs, through a file name it puts together while working, or through another tool connected to your agent.
Stopping covers the usual ways of opening a file, not every way. When a saved record is incomplete, agentwhy says so.
Does it change anything in my project?
By default, no. It only reads the saved records your agent already keeps on your computer while it works.
The warnings in your chat, stopping and hiding keys are the optional parts that add anything: a couple of lines in your project. It shows you those exact lines and asks first, and they can be taken out again at any time. With Codex, hiding keys also adds a line to Codex's own settings.
Why can't I read those saved records myself?
You can. But one afternoon of work can run to thousands of lines, written for machines rather than people, and every helper your agent started on its own keeps a separate file. agentwhy reads all of them and gives you one page.
Words on this page
- AI agent
- A program that writes and changes your app for you, like Claude Code or Codex. You tell it what you want, it does the work.
- Helper
- A second agent your agent starts on its own to do part of the job. Its work never shows up in your chat. agentwhy sees it.
- API key
- A code that connects your app to a service, like payments or AI. Whoever has it can use that service as you, and you get the bill.
- Saved record
- The notes your agent writes on your own computer as it works. agentwhy reads them. Nobody else does.
- Terminal
- The black window where commands are typed. You do not need it for any of this.
For developers
npx @agentwhy/cli-
Reads this project's sessions and opens the dashboard on
localhost. Needs Node 22 or newer. Works on macOS and Windows. agentwhy init-
Installs the optional hook that refuses the obvious secret
reads. It prints the exact lines and asks before writing them.
agentwhy init --removeundoes it. - A key in a message
-
A
UserPromptSubmithook in Claude Code and Codex, set up with the warnings, refuses a message holding one of 77 known key formats or a URL with a password. Sample values pass, and a value beside a sensitive name does not refuse. It fails open: if the hook can't run, the message goes. A refused message stays in Claude Code's record and Codex's prompt history on your disk, key included. - Hiding keys
-
A
PostToolUsehook (agentwhy hide-keys), set up byagentwhy init --hide-keysor the switch in Settings, swaps each known key format in a tool's result for[redacted by agentwhy]and adds a note for the model. In Claude Code it covers every tool's result: a file read, a command's output, an MCP tool's answer, a subagent's report. In Codex it covers a shell command's output, through a hook in~/.codex/hooks.jsonthat agentwhy approves; Codex's model reads that result as an error, and the key stays in Codex's own record. Not covered: a failed call in Claude Code,@attachments, encoded or split keys. About 35 ms per call run directly, up to about 0.5 s throughnpx. agentwhy check --mark rotated <path>- Drops a key off the list once you have changed it.
- What it reads
- Claude Code, Codex and GitHub Copilot session transcripts on disk, subagent transcripts included. Values are stripped on the way in, so no secret is ever written to the report.
- What the hook can't do
- It refuses a command that names a secrets file directly. A path assembled while the command runs can still get through — which is why the report reads what happened rather than guessing what will. It covers the supported routes; it is not a sandbox.
- What the report can miss
- File access the transcript does not record explicitly: reads inside scripts, dynamically built paths, connected (MCP) tools. When a transcript is incomplete, the report says so.
Keep your agent out of private files.
Most days nothing needs fixing. Now you'll know.
Free, no account Runs only on your computer
Does your company work with AI agents? Work with the person who makes agentwhy.