Cortex: Measurement-Gated Evolution and Pruning of Coding-Agent Skills and Rules
- Source
- arxiv.org
- Publisher
- Samuele Giampieri
- Author
- Samuele Giampieri
- Date

Context
Cortex tests whether instructions added to a actually help. It turns recurring developer corrections into replayable tasks, proposes a rule or , and compares repeated runs with and without that text. It also records whether the agent encountered the , so unused guidance cannot receive credit for an improvement. Method.
The main gains came from Anthropic's Claude Haiku 4.5 following conventions in a purpose-built repository. A stronger model gained little, and a real-project trial produced no new guidance. Although Cortex retained none of the planted harmful instructions, the experiment did not establish reliable harm detection. Its useful contribution is a measured way to assess instruction changes, with benefits dependent on the mistakes available to correct. Evaluation.
- In Cortex's experiments with Claude Haiku 4.5, auto-loading rules did most of the work. Skills helped only when offered alongside the files a task touched, and skills offered on every turn were rarely opened.
- Cortex never adds or deletes text the agent did not actually use, so the author cautions the planted-bad-suggestion test shows it keeps no unused text, not that it detects harmful instructions.
- Gains shrank with stronger models and real projects: under Claude Sonnet 5 a single run's harness added little, and on a real open-source repo where the agent was rarely corrected, Cortex found nothing to learn.
- On held-out tasks the learned harnesses raised convention-following well above a no-rules baseline, left a deliberately unlearnable control area unchanged, and added no text read on every turn.
- Agent mode — A mode in which one agent can inspect, edit, run commands, and iterate toward an outcome.
- agent skill — A reusable instruction file that teaches an agent how to do one job well — the procedure, the tools, and what counts as done.
- Instruction — A statement in the context that tells the model how to behave or what to do; module 3's first layer.
- Harness — The software that sends a model its context, recognizes tool calls, runs or refuses them, returns results and keeps the record.
articleHarness Engineering: Anatomy, Architecture, and Evolution of Coding Agents -- A Source-Code Study of Eleven SystemsPaul Barbaste, Tristan Darrigol, Germain Vu, Tom Wiltberger
articleCode Understanding is a Bottleneck for Coding AgentsNishant Balepur, Kiran Tomlinson, Tobias Schnabel
articleDemystifying the Autoresearch Harness: How Context and Skills Shape Self-Evolving AgentsKelvin Kiu-Wai Tam, Newt Hue-Nam K. Nguyen, Tianshi Zheng, Yunxiang Mo, Weihan Li, Zhongwei Xie, Chiu Yeung Tang, Jui-Yu Ho, Yangqiu Song, Ginny Y. Wong, Simon See