name: agentwhy-session-audit description: Checks which private files (.env, keys, secrets) Claude Code and its subagents reached in this project, whether a value came into an agent's context, and which key to change, by running the open source agentwhy CLI over the session records Claude Code already keeps on disk. Use when the user asks whether the agent or a subagent read their .env or other secrets, which private files a session touched, whether a key leaked into the conversation, or which key to rotate. Runs locally and never prints a secret value. category: security license: Apache-2.0
agentwhy session audit
agentwhy (Apache 2.0, npm @agentwhy/cli) reads the session records Claude
Code keeps on disk, including each subagent's own transcript, and says which private files were reached and how. It
works by fixed rules: no AI model, no account, no network request once the package is installed. Values are replaced
before the report is built, so its output names files, never their contents. It needs Node 22 or later.
By default it treats these as private: .env*, *.env, .npmrc, secrets/, .ssh/, id_rsa*.
Run every command below from the folder Claude Code was started in, the project root. If finds it installed, use in place of . The first run downloads that pinned version from npm; agentwhy never updates itself.