Claude Code alternatives for penetration testing and security work
Why security people look past Claude Code, what a pentest agent actually needs (tools, approvals, sandboxing, logs, model choice), the honest options as of 2026-11 — Codex CLI, OpenCode, Aider, local models, caveira — and when staying on Claude Code is the right call.
· 8 min read
Claude Code is one of the best coding agents there is, and a lot of security work runs through it without a hitch. People start looking for an alternative for a narrower reason: the model behind it sometimes refuses or hedges on legitimate offensive work — an exploit for a CVE in scope, a payload for a lab, an unpacker for a malware sample — and the formal way around that takes an application and, for red-team work, an organization. If that's your situation, there are good alternatives. If it isn't, Claude Code may already be the right tool.
This guide covers what to require of any agent you put on a pentest, the realistic options, a comparison from sourced facts (as of 2026-11, checked 2026-11-22), and the cases where you should stay where you are. We make caveira, one of the options, so we've kept to sourced facts and said where the others win.
Whatever agent you pick, a pentest is authorized work against a defined scope. The agent doesn't know your scope unless you write it down, and no agent makes testing a system you don't have permission to test legal.
Why people look for an alternative
The reasons are specific, and worth separating, because each has a different fix.
- Refusals and classifier blocks. Anthropic's usage policy (as of 2026-11) explicitly allows security research and testing on systems you own or operate, with the owner's authorization, or within a bug-bounty scope. But it also runs real-time cyber classifiers, and the policy itself says "encountering a block does not by itself indicate a violation." In practice that means legitimate requests sometimes get stopped. This guide covers the wording and options that get work through before you switch anything.
- The verification path doesn't fit you. The Cyber Verification Program (as of 2026-11) unlocks more, but Red Team Access — authorized pentest, red teaming and exploit development — is for organizations only, needs business verification and data retention, and targets about two weeks of review. Defense Access is open to individuals but covers SecOps, IR, malware analysis and vuln triage, not offensive work. And enrolled users "may still see some model refusals and classifier blocks."
- Model choice and data. Claude Code runs Anthropic models. If client data can't go to a hosted model, or you want to choose the model yourself, you need an agent that can point somewhere else.
What to require of an alternative
A chat window that answers security questions isn't an alternative to Claude Code. A pentest agent needs the same shape — an agent with a shell — plus a few things that matter more in security than in ordinary coding:
- A terminal agent with real tool use. It runs
nmap,ffuf,sqlmap,curland your scripts, reads the output, and decides the next step. Pasting output into a chat is slower and loses the agent's ability to check itself. - Approvals. A mode where it asks before every command, and a way to allow specific tools once you trust it. On an engagement, the dangerous moment is a command against a host you didn't mean to touch; approval is what stops it.
- A sandbox. Commands that run in a container or a confined workspace, so a mistaken
rmor a hostile binary can't reach the rest of your machine. - Logs. A full transcript of every command and its output, for your report and for anyone who asks later what the tool did.
- Project instructions. A file the agent always reads (
AGENTS.md,CLAUDE.md,CAVEIRA.md) where the scope, rules of engagement and forbidden actions live. The bug-bounty workflow shows how to write one. - MCP. So the tool servers you already use — GhidraMCP, HexStrike AI, Burp integrations — plug in.
- Model choice that fits your work. Either a model that doesn't refuse legitimate offensive tasks, or the freedom to bring one, local if the data can't leave.
The options
OpenAI Codex CLI. The closest in shape: a terminal coding agent, open source under Apache-2.0, with an IDE extension and cloud agents. On OpenAI's hosted models the policy is stricter on paper than Anthropic's: the usage policy (as of 2026-11) has no explicit authorized-research exception, and Trusted Access for Cyber gives verified users GPT-Daybreak-Blue for defensive work, with GPT-Daybreak-Red for pentest and red-team workflows approved separately. The difference that matters here is that Codex can run against a local model: --oss uses Ollama or LM Studio, and custom providers with a base_url are supported (config). Pointed at a local abliterated model, it's a free, offline pentest agent — at the quality of whatever model your hardware can run.
OpenCode and Aider. Open-source agents (MIT and Apache-2.0) that work with almost any model: hosted APIs, Ollama, LM Studio, vLLM and any OpenAI-compatible endpoint (OpenCode providers, Aider's LLM docs). OpenCode is the closer match to Claude Code's agent loop; Aider is a pair programmer built around your git repo. Both inherit the policy and the quality of the model you plug in.
Local abliterated models, in any of the above. The DIY route: an open-weight model with the refusal direction removed, served by Ollama, LM Studio or llama.cpp on your own machine. Free, private, no account. The costs are hardware — a ~30B model is about 18.6 GB of weights at Q4 (unsloth GGUF) — and some quality, since abliteration can degrade it (Labonne). Local vs hosted, in depth.
Framework layers: PentestGPT and HexStrike AI. Not replacements for the agent but additions to it: PentestGPT is a pentest pipeline that itself runs on Claude Code or Codex backends, HexStrike is an MCP server that hands any agent 150+ security tools. Both are MIT and free, and both are only as willing as the model behind them. The PentestGPT and HexStrike guide compares the architectures.
caveira. A terminal agent and desktop app in the same shape as Claude Code, whose backend serves uncensored, abliterated open-weight models — so no application and no verification step. It ships security skills (reverse engineering, binary exploitation, web-app testing and more), speaks MCP (and copies in servers you've set up in Claude Code or Cursor), has an approval mode (--confirm), a bash sandbox that confines writes to the project or runs commands in a container, and an optional Docker box with nmap, sqlmap, ffuf, pwntools, gdb, radare2 and a headless Chromium behind mitmproxy. Sessions are saved in full under ~/.caveira/sessions/. Plans are Free, then $20, $50, $100 and $200 a month (as of 2026-11, pricing).
Side by side
| Open source | Models | Local models | Security policy (as of 2026-11) | Price (as of 2026-11) | |
|---|---|---|---|---|---|
| Claude Code | No (licence) | Anthropic (Opus 5.5 default) | No | AUP allows authorized testing; classifiers can block; CVP Red Team for organizations | Pro $20/mo, Max $100, Ultra $200 (pricing) |
| Codex CLI | CLI, Apache-2.0 | GPT-6.x family | Yes, --oss or a custom base_url | No explicit research exception; Daybreak-Red approved separately (cyber safety) | Plus $20/mo; Pro $100, $200 or $500 (pricing) |
| OpenCode | MIT | Any, via providers | Yes, Ollama, LM Studio, vLLM | The model's own | Free; you pay for the model |
| Aider | Apache-2.0 | Most LLMs | Yes | The model's own | Free; you pay for the model |
| caveira | No | Uncensored, abliterated open weights | Yes, a model server on your own machine (--base-url, localhost only) | No verification step; authorized use only, per its terms | Free; $20, $50, $100, $200/mo |
Where each one wins
- Claude Code has the strongest model in this list, the most mature ecosystem (MCP, skills, hooks, subagents, plugins, the Agent SDK) and the most surfaces. It also has the clearest written authorization path for security work.
- Codex CLI is open source, has strong hosted models and a formal cyber-access program, and doubles as a local-model agent.
- OpenCode and Aider are free, open, and let you bring any model. With a local model, nothing leaves your machine.
- caveira does offensive and reversing work without refusals or an application, packages the security tooling and practice labs, and has a $50 tier where Claude Code goes from $20 to $100. Its models are open-weight, not frontier: on the hardest reasoning, Claude Code's model can be ahead.
When staying on Claude Code is the right call
Switching has costs, and for a lot of security work there's no reason to pay them.
- Your work mostly goes through. Code review, writing scanners and parsers, detection engineering, report writing, and much of lab and bug-bounty work pass Anthropic's policy. Better framing — saying what the target is, that you own it or are authorized, and what the output is for — fixes many refusals.
- Your organization can get Red Team Access. Then you have a frontier model with a written authorization path, which is a strong position for a consultancy. Expect the review wait and occasional blocks anyway.
- Model quality is the bottleneck. For a hard vulnerability-research problem, a stronger model can matter more than a willing one.
- You can mix. Many people keep Claude Code for the bulk of their coding and use a second agent for the specific tasks it won't do. Both read
AGENTS.md, so the same project instructions and scope work in either, and both speak MCP. See the Claude Code comparison for the side-by-side.
Whatever you run, the habits matter more than the agent: scope in the project instructions, approval mode on until you trust a tool, commands in a sandbox, and a log of everything. If you're choosing between pentest tools more broadly — autonomous platforms, Burp AT, frameworks — the 2026 comparison covers the whole field.