agentwhy

Stop it

Stop your AI from opening private files.

Your AI agent asks before it installs something, but not before it opens a file. agentwhy can add rules that stop the obvious tries at the files you keep private, and tells you if one gets past.

You choose

For every private file,
you decide what happens.

Stop your AI, or let it open the file and tell you. One click per file.

API keys We stop your AI.Your AI opens it. You're told.
Customer list We stop your AI.Your AI opens it. You're told.
Bank details We stop your AI.Your AI opens it. You're told.

Try it: click Stop or Tell me.

Stop

We stop your AI when it tries to open it.

Best for API keys and bank details.

Tell me

Your AI can open it. You'll know when it does.

Best for files your AI needs for its work.

Either way, you get a report. Every conversation, every file your AI opened, and what to fix. In one place.

In your chat

Here's what each one looks like.

Two examples in Claude Code: a file agentwhy stops, and a file it lets your AI open and tells you about.

Stop: your AI can't open it.

Your AI asks for the file and a rule turns it down. At the end of its reply, agentwhy tells you it kept your AI out.

Use it for the file with your API keys.

On the screen, .env is the file with your API keys.

Tell me: your AI opens it, and you're told.

Your AI can open the file whenever the work needs it. At the end of its reply, agentwhy tells you it did.

Use it for a file your AI needs, like the customer list it writes emails from.

Examples in Claude Code. agentwhy's words and Claude Code's are word for word; what your AI says is an example.

Private files

Which files count as private.
And what no rule can stop.

By default, agentwhy treats as private the file with your API keys, your server login keys and a folder called secrets. You can add your own files and folders.

A rule stops the usual ways in: asking for the file by name, or a search that would print it. A small program your AI writes and runs can still get past, so agentwhy also checks afterwards and tells you.

For developers: by default .env*, *.env, .npmrc, secrets/, .ssh/, id_rsa*. Add your own with npx @agentwhy/cli init --protect "config/*.pem"; a place outside the project with npx @agentwhy/cli protect "~/.ssh/**" (tested on a Mac, in Claude Code's terminal).

Straight answers

What people ask about stopping.

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.

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