Human-governed AI coding. No speed lost.
You gave Claude Code bypass permissions because the default permission prompts slow you down. Good. ZLAR-CC gives you the speed back โ and adds a gate where it matters.
Claude Code with bypass permissions is powerful. It can write files, execute shell commands, install packages, and modify your system โ all without asking.
That's the point. That's why you enabled it.
But there's no middle ground built in. It's either full friction (approve everything) or no friction (approve nothing). Every tool call gets the same treatment regardless of whether it's reading a file or running rm -rf /.
ZLAR-CC creates the middle ground that doesn't exist.
ZLAR-CC hooks into Claude Code's PreToolUse protocol. Every tool call โ all 10 of them โ passes through a deterministic gate before execution.
The gate has no intelligence. It doesn't use AI. It doesn't make judgment calls. It classifies, matches against your policy, and either passes instantly or halts for your approval.
| What happens | How |
|---|---|
| Tool call intercepted | PreToolUse hook, fail-closed |
| Risk classified | Two-stage deterministic classifier |
| Policy matched | Your rules, Ed25519 signed |
| Low risk | Passes instantly โ no delay |
| High risk | Halts. You get a Telegram message. You approve or deny. |
95% of actions flow through instantly. The 5% that matter โ destructive commands, sensitive file access, network operations โ wait for you.
| Tool | What it does | Default |
|---|---|---|
| Bash | Shell commands | Always gated |
| Read | File reads | Sensitive paths gated |
| Write | File creation | Policy-dependent |
| Edit | File modification | Policy-dependent |
| Glob / Grep | File search | Sensitive paths gated |
| WebFetch / WebSearch | Network requests | Always gated |
| NotebookEdit | Jupyter edits | Policy-dependent |
| Task / Agent | Sub-agent spawning | Always gated |
| TodoWrite, AskUserQuestion, EnterPlanMode… | Internal tools | ⚡ Pass-through โ zero overhead |
| mcp__<server>__<tool> | Third-party MCP | 🚦 Ask by default |
MCP tools classified. Every call to a third-party MCP server triggers an approval request. Governance follows the tool, not just the model.
Internal tools pass instantly. TodoWrite, AskUserQuestion, plan mode โ conversation-internal tools have zero governance overhead. The gate only fires when it matters.
Denied-by distinction. Every deny includes denied_by: [human], [timeout], [policy], [rate_limit], or [gate_error]. Your agent knows exactly why it was blocked.
find / -delete)chmod, env vars)tier = max(all axes)
The policy file is yours. You write it. You sign it with Ed25519. The AI cannot modify the rules that govern it.
# Example: allow reads, gate writes, block destructive commands
rules:
- pattern: "cat *"
action: allow
- pattern: "rm *"
action: deny
- pattern: "git push *"
action: hold # sends to Telegram for approval
No machine learning. No inference. No heuristics. String matching against human-authored rules.
If something breaks, everything stops. Not everything continues.
| Scenario | What happens |
|---|---|
| Gateway unreachable | All actions denied |
| Unknown tool | Denied |
| Policy signature invalid | All actions denied |
| Classifier error | Denied |
| Telegram down | High-risk actions wait (configurable timeout) |
git clone https://github.com/ZLAR-AI/ClaudeCode_ZLAR-CC.git
cd ClaudeCode_ZLAR-CC
npm install && npm run build
cp .env.example .env # add your Telegram bot token
npm run keygen # generate Ed25519 keypair
npm run sign-policy # sign your policy
npm run dev:gateway # start the gate
Then add the hook to your Claude Code settings. See the README for full setup.
After signing your policy, extract your public key — the install guide walks you through it. Without this step, the gate can’t verify signatures and blocks all actions.
✓ Verified working on macOS Sequoia with Claude Code Opus 4.6. The gate that governs this project’s own Claude sessions is this gate.
Same principle: independent governance that does not depend on the model's cooperation. Different surfaces.
| Product | Platform | What it does |
|---|---|---|
| ZLAR-OC | macOS (OpenClaw) | OS-level containment โ user isolation, kernel sandbox, firewall, signed policy, audit trail |
| ZLAR-CC | Claude Code | Hook-based gate โ tool-call interception, risk classification, signed policy, Telegram approval |
| ZLAR Gate | Claude Code + Cursor + Windsurf | Universal policy enforcement โ one gate, three frameworks |
| ZLAR-LT | Claude Code + Cursor + Windsurf | Zero-config governance โ one command install, deny-heavy defaults |
| ZLAR-AU | ZLAR Gate audit trail | Compliance reporting โ PCI-DSS, SOC 2, OSFI B-13, SOX, EU AI Act |
| ZLAR-NT | Cross-platform | Network egress policy โ domain-aware, gate-integrated |
| ZLAR-FL | Cross-platform | Fleet governance โ registry, health monitoring, audit aggregation |
Built by Vincent Nijjar and ZLAR Inc.
Open source under Apache License 2.0. Free to use, modify, and distribute.