CursorStefan Heule & Jediah KatzExplainer
Continually improving our agent harness
Summary
Cursor describes its agent harness as an iterative product process: vision-driven hypotheses are tested through offline evals, real-world A/B experiments, and instrumentation. Its context strategy has shifted from static codebase context and guardrails toward dynamic retrieval as models improve, while model-specific prompts and tools match training conventions. Quality measurement combines CursorBench with latency, token efficiency, tool-call errors, cache behavior, code Keep Rate, and language-model analysis of user responses. The team classifies expected and unknown tool errors, uses per-tool and per-model anomaly baselines, and automates log investigations and backlog tickets; one sprint reduced unexpected tool-call errors by an order of magnitude. The harness also supports model switching and subagents, although switching can cause cache misses and summary information loss, and the post argues that multi-agent orchestration will make harness engineering increasingly central.
Context
Cursor treats agent quality as difficult to measure and continually changing with model capabilities, harness complexity, tool failures, and model-specific behavior. The post also identifies challenges in preserving context and performance when users switch models mid-conversation.
Approach / What changed
The harness combines dynamic context retrieval, model-specific prompts and tool formats, offline benchmarks, online A/B tests, quality and error metrics, anomaly detection, automated log investigation, and subagents. Model changes are evaluated and tuned through experiments, team usage, and targeted prompt or tool adjustments.
Takeaways
Code Keep Rate and language-model analysis of user responses complement operational metrics such as latency, token efficiency, tool-call count, and cache hit rate when assessing agent quality.
Unknown tool errors are treated as harness bugs, while expected errors are classified by cause and monitored with per-tool, per-model anomaly baselines to detect regressions.
Switching models mid-conversation changes prompts and tools, can cause provider- and model-specific cache misses, and may lose details when the conversation is summarized; subagents provide a fresh-context alternative.
Source and freshness
- Source
- cursor.com
- Published
- Added to Yomu
- Last updated
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.