---
version: 0.15.0
date: 2026-06-18
headline: "Native Anthropic /v1/messages: point the real Claude Code CLI at your own local kernel-fronted model with one command."
themes: ["gateway", "dogfood", "harness"]
highlights:
  - "fak serve now speaks native Anthropic /v1/messages (buffered + SSE)."
  - "Real Claude Code CLI drives a local model through the kernel — proven live."
  - "One command: scripts/dogfood-claude.sh (run / probe / smoke)."
  - "Aligned with the account switcher via an isolated .claude-faklocal account."
  - "Every proposed tool call still adjudicated at the kernel boundary."
---

**TL;DR** — `fak serve` can now front a locally-served model as a *native* Anthropic
Messages server, so the **real Claude Code CLI** (`ANTHROPIC_BASE_URL`) runs live
turns against your own box while the kernel adjudicates every tool call it proposes.
One command spins the whole stack up. This is fak used as a product, by us.

## Native Anthropic Messages front door (#fak #gateway #dogfood)

- **What changed** — `fak serve` exposes `POST /v1/messages` (and
  `/v1/messages/count_tokens`) alongside the existing OpenAI `/v1/chat/completions`.
  - *Why:* Claude Code speaks the Anthropic Messages wire, not OpenAI — a native
    front door lets the real harness point straight at the kernel with no shim.
  - *How:* `internal/gateway/messages.go` + `internal/agent/anthropic_server.go`
    (the structural inverse of the already-tested client adapter). Buffered JSON, or a
    synthesized well-formed SSE stream when `"stream":true`
    (`message_start`…`message_stop`, `text_delta` / `input_json_delta`); `tool_use`
    ids survive the round trip.
  - Both protocols run the *identical* kernel filter — `adjudicateProposed` extracted
    from `handleChatCompletions`, so deny/repair behavior is one shared path.
  - Fixes a `stop_reason` edge case: an all-denied turn ends the turn rather than
    falsely reporting `tool_use`.

## One command to use it as a product (#harness #dogfood)

- **What changed** — `fak/scripts/dogfood-claude.sh`: build → serve a local model
  (ollama default, `local_shim.py` fallback) → start the kernel in front → wire and
  launch Claude Code.
  - *Modes:* `run` (interactive), `--probe` (one headless live turn, captured),
    `--smoke` (curl the wire, no model), `--print-env`, `--list-accounts`.
  - *Account switcher:* resolves `CLAUDE_CONFIG_DIR` through
    `tools/fleet_accounts.py`, defaulting to an isolated `.claude-faklocal` dogfood
    account (now a first-class entry in the roster); `--account <tag>` selects any worker.
  - *Proven live:* qwen2.5:1.5b via ollama emits an adjudicated `tool_use` through
    `/v1/messages`, and the real Claude Code CLI completes a turn (`subtype:success`,
    `modelUsage:{qwen2.5:1.5b}`). See `fak/DOGFOOD-CLAUDE.md` for the required-items
    checklist + captured evidence.

## Also in this release (#docs #session #bench)

- **50×5 session value-stack** — README now features the measured 60.3× wall-clock
  result (97% of the 62× arithmetic floor) with charts, plus a shareable deck,
  one-pager, and plain-language glossary under `fak/SESSION-VALUE-STACK-*`.
- **SWE-bench cost/geometry scaffolding** — new `internal/swebench` package
  (instance/geometry/cost/tokens) landed alongside the gateway work in the same commit.
