Research · Local LLM Routing

ZeroTurn: Performance and Use Implications of Deterministic Fast Paths for Local Agents

Charles E Morgan IV · May 2026

Abstract

Abstract

ZeroTurn is a deterministic pre-model routing layer for local agents. Its premise is narrow: when a user request is explicit, parameter-complete, and mapped to an allowlisted local action, the bridge should execute that action directly rather than spend a model turn deciding whether a known capability exists. This paper describes the tool's architecture, summarizes a local benchmark proof run, and discusses the implications of moving simple browser, file, and capability-inspection requests off the model path. In the committed benchmark, ZeroTurn deterministic dispatch reported a median latency of 29.641 ms, while a Codex model-turn classification baseline reported 3,789.852 ms, corresponding to a 127.86x median speedup for the benchmarked fast-path cases. The result supports a limited but useful claim: deterministic fast paths can materially reduce latency for explicit local actions, while ambiguous planning and reasoning should remain on the model path.

Introduction

Local agent systems often route every user request through a general model loop. That design is flexible, but it makes simple and fully specified commands pay the same latency and reliability cost as open-ended reasoning. ZeroTurn targets the subset of requests where interpretation is already complete at the surface form: for example, opening a URL in a named browser or creating a text file with supplied contents. The model remains available for incomplete, ambiguous, creative, or multi-step work.

The core contribution of ZeroTurn is not a new model. It is a conservative bridge pattern: parse before the model, dispatch only when the parser returns a complete allowlisted request, and fall through to the model on no-match. This changes a portion of agent latency from model inference and orchestration latency into local parsing and deterministic tool-call latency.

System Design

ZeroTurn sits in front of Codex or another local agent runtime as a gate. A bridge receives user text, calls the ZeroTurn parser, and either dispatches a recognized local request or returns control to the normal model turn. The direct fast paths currently documented in the repository are browser URL opening, text-file creation, and cached capability inspection. File creation is constrained to text-like extensions, and relative output paths are resolved under the workspace artifact directory unless they are explicitly inside allowed roots.

This design makes the allowlist the central safety boundary. A fast path is appropriate only when all required parameters are present and validation can be performed without model judgment. The parser should prefer no-match over guesswork. In practical terms, ZeroTurn is best understood as a latency and reliability optimization for already-obvious actions, not as a replacement for planning, interpretation, or policy reasoning.

Benchmark Method

The repository defines a benchmark contract with four paths: in-process intent recognition, in-process parse plus deterministic router dispatch in dry-run mode, full CLI subprocess dry-run, and an optional Codex execution baseline that classifies the same requests without tool side effects. The committed proof run used five benchmark cases: two browser-open requests, two file-create requests, and one ambiguous request expected to no-match. The proof run was recorded on May 1, 2026 on macOS 26.3.1 arm64 with Python 3.9.6 and Codex CLI 0.125.0.

The most important comparison is the median latency ratio between ZeroTurn deterministic dispatch dry-run and the Codex model-turn classification baseline. This comparison isolates the decision and routing cost for explicit local actions. It does not measure full user-perceived latency for every agent workflow, nor does it claim superiority for tasks that require reasoning or missing-parameter recovery.

Results

Table reproduces the benchmark medians and p95 latencies reported by the repository's latest local proof run.

PathMedian msp95 msCount
ZeroTurn parse0.0120.063100
ZeroTurn parse plus deterministic dispatch dry-run29.64131.803100
ZeroTurn CLI dry-run64.04365.47615
Codex exec model-turn classification3,789.8523,935.6025
Local benchmark proof run from May 1, 2026. Counts reflect repeated execution of five benchmark cases under different iteration settings.

The reported median speedup for deterministic dispatch versus the Codex model-turn baseline is 127.86x. Parse-only recognition is effectively sub-millisecond at the measured scale, while subprocess invocation raises the ZeroTurn CLI path to a 64.043 ms median. That gap suggests that embedding ZeroTurn as an in-process bridge is preferable when the host agent can do so, while the CLI remains fast enough for shell-level integration.

Correctness is as important as latency for this class of tool. The benchmark report states that all cases matched their expected action in both ZeroTurn and the Codex baseline, with coverage for explicit browser-open, file-create, and no-match requests. This matters because a fast path that mishandles ambiguity would merely trade latency for unsafe action. The no-match case demonstrates the intended fallback behavior: unclear work should continue through the model.

Use Implications

The first implication is responsiveness. Removing a multi-second model turn from common local actions changes the interaction feel of an agent bridge. A URL open or file create can return in tens of milliseconds at the deterministic dispatch layer, leaving the model loop available for requests that actually need semantic work.

The second implication is reliability. Deterministic routes remove sampling variance and prompt sensitivity from simple commands. When the input matches the grammar and passes validation, the bridge can execute a known command shape. When it does not match, the model receives the request unchanged. This reduces the number of places where a simple command can be misread.

The third implication is governance. Fast paths must be conservative because they bypass the deliberative model turn. Each new action should have a clear schema, complete parameters, dry-run support where practical, filesystem and application boundaries, and tests that include both positive and no-match examples. The current repository documentation reflects that posture by limiting fast paths to narrow, explicit local actions.

The fourth implication is user trust. The user should not need to understand the routing layer, but the system should make safe confirmations and failure messages legible. A bridge that silently performs broad actions would be risky; a bridge that quickly performs narrow, expected actions can make the agent feel more direct without making it less accountable.

Limitations

The benchmark is a local proof run, not a large cross-machine study. It covers five cases and uses dry-run dispatch for the deterministic router path. The Codex baseline is a classification round trip without side effects, so the result should be read as a decision-path comparison rather than an end-to-end task benchmark. The measured speedup also depends on local machine state, Codex CLI behavior, authentication, and runtime overhead.

The result therefore supports a bounded engineering decision: use ZeroTurn where the request is explicit, parameter-complete, and allowlisted. It does not justify routing ambiguous planning, creative generation, code changes, or multi-step tasks away from the model.

Conclusion

ZeroTurn shows that a small deterministic layer can remove avoidable model turns from local agent workflows. In the repository's benchmark proof run, deterministic dispatch was 127.86x faster at the median than a Codex model-turn classification baseline for the covered explicit fast-path cases. The practical lesson is not that deterministic tools should replace models. It is that local agents benefit when obvious actions are handled by simple, audited machinery and uncertain work is left to the model.

References

  1. ZeroTurn repository. README.md. Describes the ZeroTurn fast-path layer, current direct actions, integration examples, and validation commands. Repository file: README.md, accessed May 2026.
  2. ZeroTurn repository. Fast Paths. Documents the capability cache, browser-open route, file-create route, path constraints, and success contract. Repository file: docs/FAST_PATHS.md, accessed May 2026.
  3. ZeroTurn repository. Codex Automation. Documents the pre-model gate flow and bridge integration pattern. Repository file: docs/CODEX_AUTOMATION.md, accessed May 2026.
  4. ZeroTurn repository. Benchmarks. Defines the benchmark contract, measured paths, optional Codex baseline, and interpretation of speedup. Repository file: docs/BENCHMARKS.md, accessed May 2026.
  5. ZeroTurn repository. Benchmark Results. Reports the May 1, 2026 local proof run, benchmark command, median latencies, p95 latencies, counts, correctness summary, and 127.86x median speedup. Repository file: docs/BENCHMARK_RESULTS.md, accessed May 2026.
  6. ZeroTurn repository. Local Codex Benchmark Proof JSON. Raw benchmark result with metadata and summary statistics for the May 1, 2026 proof run. Repository file: benchmarks/proof/local-codex-2026-05-01.json, accessed May 2026.
  7. ZeroTurn repository. Benchmark Cases. Case definitions for browser-open, file-create, and ambiguous no-match requests. Repository file: zeroturn/benchmark_cases.json, accessed May 2026.

Back to Local LLM Routing