agentwhy

How it works

It runs on your computer.Nothing leaves it.

agentwhy reads the records your AI agent already keeps as it works. There is no account, and nothing is sent anywhere. It shows which file was opened, never what is inside it.

Your files stay yours

We watch the door,
not what's inside.

Stays on your computer.

Nothing is uploaded. No account.

Never shows what's inside.

Only which file was opened, and what to change.

You're in control.

Change a setting or turn it off anytime.

Straight answers

What people ask before they run it.

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.

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.

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 --remove undoes it.
A key in a message
A UserPromptSubmit hook 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 PostToolUse hook (agentwhy hide-keys), set up by agentwhy init --hide-keys or 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.json that 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 through npx.
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.

Start agentwhy

Pick the app you already use. One line, and you're done.

  1. Open your own project in Claude Code or Codex — in the Claude desktop app, use its Code tab, not Chat.

    Your project is the folder you build in. agentwhy only ever looks at the one you open it in.

  2. Paste this line in:

    Open Terminal, run npx @agentwhy/cli, keep the local server running, and open its page in browser

  3. A page opens on your computer. That's where you set everything up.

An example of what you'll see
  1. Open a terminal in your own project. That's Terminal on a Mac and PowerShell on Windows.

    Your project is the folder you build in. agentwhy only ever looks at the one you start it in.

  2. Type this:

    npx @agentwhy/cli

    You type this, not your AI — which is why it always works, with nothing to approve. Needs Node 22 or later.

  3. A page opens on your computer. That's where you set everything up.

An example of what you'll see

Add agentwhy to Claude Code once

  1. karolkozer/agentwhy

  2. /agentwhy:report

Step 1 of 5
  1. Open Claude Code in a terminal, in your own project. It needs version 2.1.275 or later.

  2. Type this, then choose Install for you:

    /plugin install agentwhy --marketplace karolkozer/agentwhy

  3. Then type this in a conversation:

    /agentwhy:report

An example of what you'll type