AgentWarden Antivirus for AI

How to secure Claude Code on your computer

Last updated 23 October 2026

Claude Code can read your files and run commands in your terminal. A few habits make it much harder for a mistake or a hijack to cost you, and a watcher on the machine catches what slips through.

1. Keep approvals on

Let Claude Code ask before it runs commands or edits files outside the project, especially in repositories you did not write. Modes that skip every approval are convenient, but they remove the moment where you would notice something odd.

Allow specific, harmless commands instead of allowing everything.

2. Use the sandbox

Run agents inside the strongest sandbox your setup offers, so a bad command cannot reach the rest of your computer. Your agent's own sandbox is still the strongest protection.

3. Keep secrets out of reach

Do not keep production keys, wallet phrases or password exports in the project folder or in files an agent reads by default. Use a password manager or a secrets store, and give agents short-lived, limited tokens.

4. Be careful with what it reads

Web pages, issues, pull request text and tool output can contain instructions written for the agent, not for you. Be suspicious when an agent suddenly wants to read credentials, change its own settings or send data somewhere right after reading outside content.

5. Review MCP servers, skills and project instructions

Install MCP servers and skills only from sources you trust, and look again when they change. Watch for changes to CLAUDE.md, AGENTS.md and project settings, which steer every future session.

6. Have a way back

Commit often, keep a copy of important projects elsewhere and keep backups or restore points, so a destructive command is an inconvenience, not a loss.

What AgentWarden adds for Claude Code

AgentWarden reads Claude Code session logs on your machine and judges every step against what you asked. It flags off-task and attack-like actions, links a hidden instruction in content the agent just read to the sensitive action that follows, and scans skills and MCP servers before they run.

With containment on, it can make Claude Code refuse a single dangerous action or pause only a session judged hijacked. Stop AI, free on every plan, pauses every agent at once and switches off MCP servers in your agents' settings, keeping a copy of each file first.

The Pro checkup on the Health page shows which skills and MCP servers are new or changed, when CLAUDE.md, AGENTS.md or project settings changed, what each agent may do without asking, which credential files an agent could reach, and whether your safety nets are in place.

Questions

Is it safe to run Claude Code without approvals?

It is riskier. Without approvals nothing stops a mistaken or hijacked command before it runs. Keep approvals on for unfamiliar repositories and allow only specific harmless commands.

Can AgentWarden stop Claude Code?

Yes, with containment on it can refuse a single dangerous action or pause a session judged hijacked, and Stop AI pauses every agent at once. An action already running is detected rather than stopped.

Does AgentWarden slow Claude Code down?

No. It uses around 1% of the processor and never interrupts your work unless a session is judged hijacked.

AgentWarden is antivirus for AI agents for Mac and Windows. It watches Claude Code, Codex, Cursor and about thirty other agents on your own computer, everything analysed on the device. Free for one computer; Pro has a 14-day free trial. Get AgentWarden

More guides