XNews

Cursor and Grok Agent Harness, Routing, and Model Economics

Cursor and Grok Agent Harness, Routing, and Model Economics

Cursor introduced Cursor Router, a request-level classifier trained on 600K+ real requests that selects models per task, reducing costs 30–60% while maintaining quality. It routes simple tasks to cheap models, UI changes to aesthetically best models, and complex problems to frontier models, accounting for cache misses. Three modes: Intelligence (near-Fable satisfaction, 60% cheaper), Balance (higher satisfaction than Opus 4.8, 36% cheaper), Cost. Cursor also detailed recursive model improvement: an outer loop of user feedback and an inner loop of better RL environments, with agents automating research tasks. Grok 4.5, co-trained with SpaceXAI, is Cursor's strongest model. An agent swarm architecture using a tree structure (planner + workers) achieved 100% on a SQLite reimplementation task, with costs ranging from $1,339 (Opus planner + Composer workers) to $20,057 (all Fable 5). Key findings: frontier models only needed for high-entropy decisions; worker tokens dominate but planner cost can be majority; harness quality matters more than model mix. SpaceXAI open-sourced Grok Build's agent harness, a seven-layer architecture with local-first support, two-pass context compression, goal detection, and doom-loop prevention.

Key insights

Cursor Router cuts costs 30–60% by intelligently selecting models per request

Trained on real user traffic with satisfaction as reward, the router considers query content, context, complexity, and domain, plus cache-awareness. Intelligence mode achieves near-Fable satisfaction at 60% lower cost; Balance mode beats Opus 4.8 satisfaction by ~15% at similar cost. Enterprise early adopters saved 30–50%.

Recursive model improvement uses real-world agent data to accelerate training

Cursor's outer loop collects user feedback and A/B results; the inner loop improves RL environments and training methods. Agent fleets automate experiment management, notifying humans only when stuck. This loop produced Composer 2.5 and contributed to Grok 4.5, the first model spanning software engineering and broader knowledge work.

Agent swarm architecture enables massive task scaling with dramatic cost variation

A tree-structured swarm with a strong planner and cheap workers reimplemented SQLite from docs. Costs ranged from $1,339 to $20,057 depending on model mix, with quality similar. Frontier models were only needed for root decomposition and design decisions; workers consumed most tokens but planners dominated dollar cost.

Harness engineering is more critical than model choice for swarm reliability

The new harness reduced commits from 68K to <1K, conflicts from >70K to <1K, and codebase size from 64K to 4.6K lines while achieving 100% task completion. Five failure modes were identified: split-brain, planner contention, merge conflicts, megafiles, and ossification. Review lenses and a shared field guide improved quality.

Open-sourcing Grok Build harness promotes transparency and local-first deployment

SpaceXAI released the full agent harness with a seven-layer architecture (Leader, Session Actor, AgentActivity, Turn, Sampler, Subagent Coordinator, Tool Index). It supports local compilation, custom inference backends, and per-client capability routing. Features include two-pass context compression, goal-stop detection, and dual doom-loop defenses.

Source posts