Harness Router: A Decision Layer That Accelerates Tool Selection for AI Coding Agents

Harness Router is a three-tier routing decision layer that makes tool selection faster and cheaper for AI coding agents.
Harness Router is an open-source decision layer that sits between AI coding agents and their tool calls, solving the problems of slow, costly, and error-prone tool selection. Its core design uses three-tier routing: obvious decisions take a fast path; ambiguous ones go to the Jev engine for nuanced trade-offs; complex multi-step scenarios escalate to Monte Carlo Tree Search (MCTS) for look-ahead planning. It integrates either as a Codex hook for fully automatic interception or as a skill for explicit agent-driven invocation, balancing automation with flexible control.
When AI coding agents execute tasks, they often need to choose from a wide array of tools. This seemingly simple step can slow down the entire workflow, drive up costs, and even cause failures if the wrong tool is selected. Harness Router — an open-source project that ranked #15 on Product Hunt — targets exactly this pain point. It's a dedicated "decision layer" for AI coding agents, making tool selection faster, cheaper, and more reliable before any actual execution takes place.

What Is Harness Router
Harness Router has a clear purpose: it doesn't execute tasks directly. Instead, it sits between the agent and its tool calls, acting as a front-line "routing decision" step. In the project's own words, it is a decision layer for AI coding agents, and its core value lies in making tool selection efficient and reliable before execution begins.
Built by Kamil Mosciszko, the project spans three categories: open-source tools, developer tools, and artificial intelligence. It earned 72 upvotes after launch — not a huge comment count, but enough to claim the #15 spot of the day in the developer tools space, signaling that it addresses a genuine engineering need.
Three-Tier Routing: Separating Fast from Slow
The most notable design choice in Harness Router is its layered decision strategy, which automatically matches different processing paths based on decision complexity.
Fast Path for Obvious Choices
For tool calls where the outcome is nearly certain, Harness Router takes the "fast path" and returns a decision immediately, avoiding unnecessary reasoning overhead for straightforward problems. This matters a lot for both cost and latency — not every decision warrants a heavy model.
Jev for Ambiguous Decisions
When a choice becomes less clear-cut, routing is handed off to Jev — the core engine powering this project. The product tagline, Fast AI tool routing powered by Jev, refers to exactly this component. Jev handles finer-grained trade-offs between multiple candidate tools.
MCTS for Complex Multi-Step Decisions
For genuinely complex, multi-step decision scenarios, Harness Router can escalate to MCTS (Monte Carlo Tree Search). This is a search algorithm widely used in game-playing and planning problems, capable of systematically exploring optimal paths through vast decision spaces. Bringing MCTS into tool routing means agents tackling complex task chains can receive more deliberate, forward-looking decision support.
This "fast vs. slow" design philosophy is fundamentally about dynamically balancing decision quality against execution cost — resolving simple cases quickly while investing more compute in complex ones, rather than applying a one-size-fits-all approach that wastes resources.
Monte Carlo Tree Search (MCTS) is perhaps best known for its role in Go-playing AI — it was one of the core algorithms behind AlphaGo. Its basic principle involves repeatedly simulating random "rollouts" to estimate the value of each decision node, iterating through four phases: Selection, Expansion, Simulation, and Backpropagation. Unlike exhaustive search, MCTS doesn't need to traverse every possible path. Instead, it focuses computational resources on the most promising branches, enabling high-quality decisions within limited time even when the search space is enormous. Applied to tool routing, this means the system can perform look-ahead evaluation across multi-step combinations — such as "call tool A then tool B" versus "call tool C directly" — rather than only optimizing for the single best next step.
Two Integration Modes: Hook and Skill
Harness Router offers two flexible integration approaches to fit different use cases:
- As a Codex hook: Automatically routes every tool call without requiring the agent to explicitly trigger it. This mode suits scenarios where you want end-to-end automation with every tool call optimized transparently.
- As a skill: Used when the agent needs to explicitly invoke the router. This mode returns control to the agent, letting it proactively request routing decisions at the right moment.
Offering both modes reflects careful engineering flexibility. Developers can choose fully automated management or fine-grained on-demand control, lowering the barrier to integrating Harness Router into existing agent workflows.
The Codex hook here refers to the hook mechanism provided by OpenAI's Codex CLI, which allows developers to inject custom logic at specific points in a tool call's lifecycle. By registering as a hook, Harness Router can intercept a tool call request before the agent dispatches it, complete the routing decision, and then let it proceed — all transparently, without the agent being aware. The engineering advantage of this "intercept" pattern is that it requires no changes to the agent's core code; integration happens entirely at the configuration layer, minimizing disruption to existing workflows. The "skill" mode, by contrast, exposes the router itself as an ordinary tool available to the agent, letting the agent decide autonomously when to invoke it during reasoning — better suited for scenarios requiring more fine-grained orchestration.
The Real Problem It Solves
As AI coding agents grow more capable, the volume and complexity of tool calls are rising rapidly. Every wrong tool selection can mean longer execution times, higher API costs, and lower task success rates. Harness Router extracts "tool selection" from the execution flow and optimizes it as a standalone decision layer — a clean, well-targeted approach.
For developers building or using AI coding agents, the value of this kind of pre-execution optimization component is that it doesn't change what the agent can do, but can significantly improve end-to-end efficiency and reliability. As an open-source project, it also gives the community a referenceable, extensible routing architecture to build on.
Summary
Harness Router represents a focused direction in AI agent infrastructure — not making models smarter, but making every decision they take more precise and economical. Its three-tier routing mechanism (fast path, Jev, MCTS) and dual integration modes (hook and skill) reflect mature engineering thinking around practical usability. For developers invested in the AI coding toolchain, this is an open-source exploration worth keeping an eye on.
Related articles

Structuring Data for AI Agents: Five Approaches and a Selection Guide
There's no single best way to structure data for AI Agents. This article compares semantic models, knowledge graphs, RAG, Markdown+grep, and open formats, drawing on research from dbt, Microsoft, and Chroma to help you pick the right data architecture based on question type.

Fish Audio Drama 3 Open-Source Launch Sparks Debate: The 35B Speech Model's Selling Points and Licensing Controversy
Fish Audio Drama 3 sparks debate with 35B parameters and open weights, ranking first on pronunciation benchmarks with director-style control and word-level inpainting, but its community license restricts commercial resale, API prices are rising, and local runs need ~39GB VRAM.

curl 8.23.0 Fixes 24 CVEs, AI-Assisted Research Contributed 20
curl 8.23.0 fixes 24 CVEs, 20 found by AI-assisted research, including a High-severity HTTP/2 use-after-free that could become RCE. Here's the source, fix details, and upgrade checklist.