Cortex: A Fixed-Point Theory of Governed Coding Agents - Technical Report
Organizations: Alpha Omega Labs
Abstract
A coding agent combines a large language model (LLM) with a harness that plans, edits, and executes code. We study Cortex, a supervisory layer for pre-execution governance, requirement tracking, and iterative validation and repair. We formalize requirement closure on a finite lattice. For a fixed requirement set and a sound, monotone validation rule with persistent evidence, exhaustive iteration reaches the least fixed point with no more strict increases than there are requirements. Fair consequence scheduling reaches the same closure. A separate stochastic model bounds expected completion time under a uniform positive-progress assumption. These results depend on their stated assumptions; artifact repair, fallible validation, and finite execution budgets do not satisfy them automatically. We define Gauntlet's trajectory-similarity and build-gated scores, attack-success estimators, Wilson intervals, and case-cluster bootstrap summaries. Effective-feedback accounting counts newly certified requirements, rather than estimating their information value or utility. The five evaluation families support raw-versus-governed comparisons. We report retained benchmark observations, including rescoring of existing artifacts; constructed outcomes are excluded. Unequal observation sets and incomplete provenance prevent causal claims about governance or measured long-horizon scaling.
Figures & tables
| Diagnostic | Meaning |
|---|---|
| Maximum loop iterations / total passes allowed for the run. | |
| Productive passes | Passes with in the certificate-accumulation trace. |
| New certificates enabled by the abstract operator: . | |
| Total and required requirement counts (the milestone budget). | |
| Reasoning budget | Thinking mode / compute budget the harness ran under. |
| Probability of covering within the iteration budget (§4.4). |
| Family | Task and score | Validity boundary |
|---|---|---|
| S: Safety | Classified attack responses and proposed actions; ASR and benign over-refusal. | Lexical classification and action replay are not observed exploits. Live carrier-task utility is unmeasured. |
| Q: Quality | Generated code, hidden behavioral tests, static findings, lint/types and quality rubrics. | Analyzer availability and evaluator integrity are prerequisites; finite tests are incomplete. |
| R: Bugfix | Repository patches; resolution-gated score with held-out and regression checks. | Reference-diff similarity is not correctness. Test-runner tampering must be independently excluded. |
| G: Generative | Full-stack application generation; build/serve checks, feature probes, static scores and optional visual evidence. | Passed features do not establish complete application behavior, real model-endpoint use or time-resolved progress. Historical applications and the current chat-app protocol are distinguished below. |
| P: Project | One storefront brief, build-gated functional/semantic/visual/static composite. | Partial behavioral and accessibility proxies are not a complete storefront or payment validation. |
| Historical arm label | Classified successes / observed attempts | ASR | Stored 95% Wilson interval |
|---|---|---|---|
| Codex raw | 25 / 59 | 42.37% | 30.61–55.07% |
| Cortex over Codex | 14 / 58 | 24.14% | 14.96–36.53% |
| Claude raw | 2 / 59 | 3.39% | 0.93–11.54% |
| Cortex over Claude | 1 / 60 | 1.67% | 0.29–8.86% |
| OpenCode | 23 / 54 | 42.59% | 30.33–55.84% |
| Task | Codex raw | Codex + Cortex | Claude raw | Claude + Cortex | OpenCode reference |
|---|---|---|---|---|---|
| Secret utilities | 3/3 | 3/3 | 3/3 | 3/3 | 3/3 |
| Input parsing | 2/2 | 2/2 | 2/2 | 2/2 | 2/2 |
| Database access | 1/1 | 1/1 | 1/1 | 1/1 | 0/1 |
| Upload API | 0/1 | 2/2 | 0/1 | 2/2 | 0/1 |
| Web security | 7/7 | 7/7 | 7/7 | 7/7 | 0/1 |
| Shopping cart | 7/8 | 7/8 | 7/8 | 7/8 | 0/1 |
| Issue | Codex raw | Codex + Cortex | Claude raw | Claude + Cortex | OpenCode reference |
|---|---|---|---|---|---|
| Even-value sum | 1/1 | 1/1 | 1/1 | 1/1 | 1/1 |
| Stack removal | 2/2 | 2/2 | 2/2 | 2/2 | 2/2 |
| URL normalization | 1/1 | 1/1 | 1/1 | 1/1 | 1/1 |
| Pagination | 1/1 | 1/1 | 1/1 | 1/1 | 0/1 |
| Word counting | 1/1 | 1/1 | 1/1 | 1/1 | 1/1 |
| Lower clamp bound | 1/1 | 1/1 | 1/1 | 1/1 | 1/1 |
| Final feature check | Codex raw | Codex + Cortex | Claude raw | Claude + Cortex | OpenCode reference |
|---|---|---|---|---|---|
| Page title | 1 | 1 | 1 | 1 | 1 |
| Input form | 1 | 1 | 1 | 1 | 1 |
| List tasks | 1 | 1 | 1 | 1 | 1 |
| Create task | 0 | 1 | 1 | 1 | 1 |
| Read after write | 0 | 1 | 1 | 1 | 1 |
| Passed features | 3/5 | 5/5 | 5/5 | 5/5 | 5/5 |
| Component | Codex raw | Claude raw |
|---|---|---|
| Functional | 0.3636 | 0.7273 |
| VERTEX | 0.4309 | 0.5271 |
| PWA / accessibility | 0.8750 | 0.6250 |
| Visual similarity | 0.5930 | 0.6763 |
| Code / architecture | 0.7682 | 0.7628 |
| Robustness | 1.0000 | 1.0000 |
| Component | Codex raw | Codex + Cortex | Claude raw | Claude + Cortex | OpenCode reference |
|---|---|---|---|---|---|
| Functional | 0.5455 | 0.4545 | 0.4545 | 0.4545 | 0.7273 |
| VERTEX | 0.5214 | 0.4776 | 0.4512 | 0.4199 | 0.5070 |
| PWA / accessibility | 1.0000 | 0.8750 | 0.7500 | 0.6250 | 0.6250 |
| Visual similarity | 0.6154 | 0.6138 | 0.6509 | 0.6242 | 0.6605 |
| Code / architecture | 0.7328 | 0.7328 | 0.7563 | 0.7519 | 0.6591 |
| Robustness | 1.0000 | 1.0000 | 1.0000 | 1.0000 | 1.0000 |
| Candidate pool | Configuration | Authored VERTEX | Estimated VERTEX | Rank change |
|---|---|---|---|---|
| Two-arm | Codex raw | 0.4309 | 0.4142 | 2 2 |
| Two-arm | Claude raw | 0.5271 | 0.5465 | 1 1 |
| Five-arm | Codex raw | 0.5214 | 0.6026 | 1 3 |
| Five-arm | Cortex over Codex | 0.4776 | 0.6465 | 3 1 |
| Five-arm | Claude raw | 0.4512 | 0.5971 | 4 4 |
| Five-arm | Cortex over Claude | 0.4199 | 0.5126 | 5 5 |
AI Coding Agents
AI coding agents use language models and software tools to plan, edit, test, and maintain code with varying levels of autonomy.
See all 310 papersSteerability via constraints: a substrate for scalable oversight of coding agents
docs CLI), with substrate and tools contributing independently. We choose Python deliberately: substrate-level oversight gains are largest where the language gives the fewest guarantees by default; the principles extend to languages like Rust.