NVIDIA's Switchyard Routes Claude Code on 113 Hardcoded Strings and Ignores Your Prompt
Last Updated on August 19, 2026 by Editorial Team
Author(s): Chew Loong Nian – AI ENGINEER
Originally published on Towards AI.
Why this landed now
I counted every string NVIDIA’s new agent router matches on. There are 113 of them. Exactly one is ever tested against your prompt rather than against your tool output — and it is a phrase Claude Code wrote, not you.

After the lead, the article explains why NeMo Switchyard’s stage router decisioning is largely hardcoded: it relies on a single Rust file containing twelve static string tables plus one compaction marker, and it matches substrings against tool names, shell command lines, and tool output (with only a single four-word phrase matched from conversation text when context is compacted). It details how the router scores signals using hardcoded error severities, “spinning”/“exploring” recovery-state heuristics, and a tanh-based confidence score whose threshold of 0.5 means corroboration is required (e.g., a lone Python traceback can be ignored). The piece then walks through the architecture (TOML config with LLM clients/targets/routes, a libsy algorithm crate, and protocol translation), the agent-loop timing (decisions per LLM call based on parsed tool traffic), and how to replay the routing logic in Python by porting functions and reading tuning constants directly from the source. It concludes by contrasting stage routing with other approaches (prompt-based classifiers, learned routers, and gateway price/load routing), noting the operational caveats (threshold dataset specificity, wire-format dependence of turn depth, and cost/extra-call implications when enabling an LLM classifier), and providing guidance on when to use the stage router vs escalation or learned classification modes—while emphasizing that the router is interpreting “the wreckage” of an agent run rather than the initial prompt.
Read the full blog for free on Medium.
Join thousands of data leaders on the AI newsletter. Join over 80,000 subscribers and keep up to date with the latest developments in AI. From research to projects and ideas. If you are building an AI startup, an AI-related product, or a service, we invite you to consider becoming a sponsor.
Published via Towards AI
Towards AI Academy
We Build Enterprise-Grade AI. We'll Teach You to Master It Too.
15 engineers. 100,000+ students. Towards AI Academy teaches what actually survives production.
Start free — no commitment:
→ 6-Day Agentic AI Engineering Email Guide — one practical lesson per day
→ Agents Architecture Cheatsheet — 3 years of architecture decisions in 6 pages
Our courses:
→ AI Engineering Certification — 90+ lessons from project selection to deployed product. The most comprehensive practical LLM course out there.
→ Agent Engineering Course — Hands on with production agent architectures, memory, routing, and eval frameworks — built from real enterprise engagements.
→ AI for Work — Understand, evaluate, and apply AI for complex work tasks.
Note: Article content contains the views of the contributing authors and not Towards AI.