Why autonomous coding harnesses fail the Closure Test and OWASP ASI01 to ASI07
Autonomous coding harnesses can edit repositories, run shell commands, and open pull requests, but most still run with host credentials, unbounded token loops, and self-grading checks.
Late-2026 CLI and cloud coding harnesses look like closed engineering loops. Give them a failing issue and they read the tree, patch files, run pytest or npm test, and iterate until the exit code turns zero. Look closer at the runtime boundary and two structural gaps show up immediately: the agent grades its own work inside the same workspace it just edited, and its execution shell holds ambient host secrets and unbounded egress.
Four practical questions
Scoring the standard autonomous coding harness against the Closure Test:
| Condition | Pass? | Notes |
|---|---|---|
| 1. Closed loop | partial | The harness reads compiler and test output across turns, but observation lives in transient chat context rather than an immutable run manifest. |
| 2. Declarative target | yes | Repository diffs, branch state, and test commands express concrete intent. |
| 3. Unattended in the ordinary case | partial | Background runners can open PRs unattended, but without hard token caps or deterministic exception classes they either stall silently or burn budget in retry loops. |
| 4. Ground truth | no | The proposer writes the code, runs the tests it can see (or modify), and decides when to stop. There is no independent verifier plane. |
OWASP Agentic Top 10 (ASI01 to ASI07) failure matrix
Passing unit tests inside a permissive developer shell leaves production teams exposed to the core agentic failure modes cataloged in OWASP ASI01 through ASI07:
| OWASP Risk | Common coding-harness failure | Required runtime control |
|---|---|---|
ASI01 Agent Goal Hijack |
Untrusted issue text, PR comments, or README snippets steer tool calls toward exfiltration or backdoors. | Separate untrusted inputs from control-plane instructions and enforce Cerbos per-action permits. |
ASI02 Tool Misuse & Exploitation |
Shell and git tools run with developer host privileges outside repository scope. | Isolate every attempt inside a disposable nono sandbox with ephemeral filesystem and default-deny egress. |
ASI03 Identity & Privilege Abuse |
Static .env API keys, SSH keys, or cloud CLI tokens sit inside the agent’s environment. |
Use Infisical phantom handles and short-lived STS / WIF leases so real secrets never enter the sandbox. |
ASI04 Supply Chain Vulnerabilities |
Unpinned MCP servers or dynamically fetched packages execute arbitrary code mid-run. | Pin tool manifests, verify checksums, and require M-of-N approval before adding external dependencies. |
ASI05 Unexpected Code Execution |
Agent executes generated migration or build scripts directly on shared runners. | Run candidate patches through Tier 1 WASM smoke checks and isolated Twin-VM replay before host promotion. |
ASI06 Memory & Context Poisoning |
Unverified scratch notes persist into long-term repo memory and corrupt future runs. | Gate persistent memory updates behind blind evaluation and quote-anchored verification in RSI Reactor. |
ASI07 Insecure Inter-Agent Communication |
Subagents pass free-form instructions without schema validation or audit digests. | Bind inter-agent handoffs to typed schemas and seal artifacts in a SHA-256 Evidence Packet. |
What closes the loop in production
To move from a fast demo to an unattended production loop, three architectural changes are non-negotiable:
- Separate Proposer from Verifier. Keep the editing harness in an isolated work plane while an independent Check Cell grades the resulting diff against held-out checks and fresh context. See the two-plane loop and our earlier Cursor teardown.
- Enforce hard spend and egress stops at the gateway. Metered LLM gateways should terminate runaway retry loops before they multiply 5x chat cost into 25x agent spend. Model your unit economics in the Agent Cost Estimator.
- Seal every run before human review. Replace long chat transcripts with a deterministic manifest of artifacts, exit codes, acceptance mappings, and declared gaps using the Evidence Packet Builder, and score your workflow’s blast radius with the Workflow Readiness Check.
See also
- autonomic-swe
- agent-systems
- evals
- trust-boundary
Keep exploring
Turn the idea into a better agent workflow
Can the agent prove its own result?
Use four practical questions to find the gaps in an agent workflow.
Inspect the proofSee an evaluation system in practice
Read what the reconciler proves, what it does not, and where people remain in control.
Follow alongGet new builder notes
Follow practical notes and honest agent teardowns as they are published.