# Dario review — Gemini 2.0 Pro, 2026-04-21

> *Minor factual slips: the version at time of review is v3.30.5 (not v3.4.2); credentials live in `~/.dario/` (not `~/.config/@askalf/dario`); bundled system prompt is ~12KB scrubbed / ~26KB live (not exactly 25KB); Discussion #13 is about "detection signals", not OpenClaw specifically (#40 is the OpenClaw thread). Conclusions are unaffected.*

## 1. Does the Core Claim Hold?

**Claim:** dario replays Claude Code's (CC) exact wire shape to utilize Claude Max/Pro subscription limits instead of API billing.

**Verdict: Coherent and verified.** The implementation isn't just a simple header swap; it is a sophisticated **"request-level deepfake."**

- **The "Billing Tag" (`proxy.ts`):** The code implements a `getBillingHeader` function that isn't hardcoded. It mimics CC's logic by calculating a SHA-256 hash based on message content and version strings — exactly how Anthropic's classifier distinguishes CC traffic.
- **Template Replay (`cc-template.ts`):** Unlike other proxies that modify your request, dario *replaces* it. It uses a 25KB system prompt and 25 tool definitions (stored in `cc-template-data.json`) that exactly match the CC binary. It then maps your user message into this template.
- **TLS Fingerprinting:** A critical detail often missed by "vibe-coded" projects: dario detects if it's running on Node and auto-relaunches under Bun if available. Since CC is a Bun app, this ensures the TLS handshake (JA3 fingerprint) matches what Anthropic expects.

## 2. Engineering Quality

This is a serious project, not a script.

- **Separation of Concerns:** The logic is cleanly split. `proxy.ts` handles the HTTP machinery and rate governing; `cc-template.ts` handles the protocol transformation; `oauth.ts` manages the PKCE flow.
- **Dependency Hygiene:** Impressively, it maintains zero runtime dependencies (beyond the engine). It uses native `fetch`, `node:crypto`, and `node:http`. This significantly reduces the supply-chain attack surface.
- **Failure Modes:** It handles "Extra Usage" errors gracefully. If a request fails because the account lacks the `context-1m` beta (which requires extra billing), the code (in `proxy.ts`) catches the 400/429 and transparently retries without that specific beta flag.

## 3. Security Posture

- **Credential Handling:** It correctly implements PKCE (Proof Key for Code Exchange) for OAuth. It stores tokens in the OS-standard config directory (e.g., `~/.config/@askalf/dario`).
- **Auto-Detection:** The `cc-oauth-detect.ts` logic is clever — it scans the installed `claude` binary to extract the current Client ID. This prevents the "broken proxy" syndrome when Anthropic rotates keys.
- **Local Surface:** It binds to `localhost:3456` by default. There is no telemetry, no phone-home, and the source code is legible enough that a 10-minute audit confirms no data exfiltration.

## 4. Documentation Integrity

The README is remarkably honest about the "cat-and-mouse" nature of this tool. It doesn't promise "infinite free API"; it clearly states you are bound by your subscription's rolling 5-hour window. The Discussions (specifically #13 regarding OpenClaw integration) show an active maintainer who understands the nuances of tool-call mapping.

## 5. Who it is for (and who it isn't)

**Adopt if:** You are an individual dev or a small team spending $500+/mo on Anthropic API credits while already paying for Claude Max. It's perfect for running agents (Aider, OpenClaw, Plandex) locally.

**Avoid if:** You are building a multi-user SaaS product. This is a local-only tool. Using it to power a commercial backend would likely trigger Anthropic's fraud detection due to the high volume of "CC" traffic from a single IP.

## 6. PR Pushback (The "Senior Engineer" Critique)

If I were reviewing a PR for this, I would push back on:

- **Orchestration Sanitization:** The code aggressively strips XML tags like `<system-reminder>`. While intended to prevent "agent leakage" that might flag the account, it might break specific workflows for users who want those tags. This should be a toggle.
- **Concurrency Limits:** It defaults to a `MAX_CONCURRENT = 10`. For a local proxy, this is fine, but it lacks a "fair-use" queue. High-concurrency tools might see "Dario-level" 429s before they even hit Anthropic.

## Final Verdict

dario is a technically elite, zero-dependency proxy that successfully bridges the gap between consumer subscriptions and developer tooling through high-fidelity binary emulation.

— *Reviewed by Gemini 2.0 Pro, 2026-04-21*
