Dark Code: The AI-Generated Software Nobody Understands
AI-generated code can pass its tests while nobody on the team can explain why it works. That becomes expensive when the next change breaks an assumption nobody knew was there.
Speedscale’s proxymock CLI lets you replay recorded API requests against a change and inspect the response differences. The Go walkthrough shows the setup. The CI tutorial shows a broken change failing the check, even though the API still returns HTTP 200.
Dark code
Jouke Waleson describes dark code in his March 2026 talk notes as software no human has written, read, or reviewed. He connects it to the dark software factory: specifications go in and agents produce the implementation.
The problem shows up when the team has to change or debug code it doesn’t understand.
Dan Shapiro’s automation framework borrows its structure from driving automation. In shortened form:
| Level | Name | Human involvement |
|---|---|---|
| 0 | Spicy Autocomplete | Accept individual edits. |
| 1 | Coding Intern | Delegate a bounded task. |
| 2 | Junior Developer | Work alongside the coding assistant. |
| 3 | Code Review | Inspect the agent’s ongoing output. |
| 4 | Spec-Driven | Define the work and inspect its results. |
| 5 | Dark Factory | Direct the factory through specifications and evaluation. |
The comprehension gap
Addy Osmani’s discussion of comprehension debt describes the gap between the code a team has and the code it understands. Passing tests don’t explain the decisions buried in that code.
Anthropic studied 52 mostly junior engineers learning Python’s Trio library. In the randomized experiment, the AI-assisted group averaged 50% on the follow-up quiz; the hand-coding group averaged 67%. That’s a 17 percentage-point difference. The completion-time difference was not statistically significant.
The researchers also examined how participants used the assistant. Asking for explanations and working through concepts was associated with stronger quiz performance than delegating the work. The study concerns learning an unfamiliar library; it doesn’t measure how well an experienced team understands its production system.

The security problem
Veracode’s Fall 2026 update reports an average security pass rate of 62% in its benchmark of 18 models across four languages and four weakness categories. The score improved over its previous snapshot. These are benchmark scores, not a survey of production code.
A replay can preserve an insecure response just as faithfully as a correct one. Keep security analysis and tests for authorization failures alongside compatibility checks.

StrongDM’s dark factory experiment
In its February 2026 account, StrongDM says its three-person AI team was founded in July 2025 and pursued development without human-written or human-reviewed code. The team says agents took shortcuts on narrow tests. It describes evaluating user scenarios, often kept outside the codebase, by estimating whether the outcome would satisfy the user.
StrongDM reports building behavioral twins of services including Okta and Slack, allowing thousands of scenarios per hour. A twin models a service’s behavior; a recording contains particular exchanges with it.

Who controls the check?
Eran Kahana’s Stanford CodeX essay asks what happens when agents both build a system and evaluate it.
An agent with write access can edit the recording, transforms, baseline or gate script. Review those changes separately from the candidate. Otherwise it can change both the implementation and the definition of passing. A baseline captured from an already broken version will preserve that bug.
The CI example rejects pull requests that edit its gate inputs. It also requires a reviewer to approve the run before candidate code receives CI secrets.
Code review can examine a permission change that no captured request exercises. Replay can expose a response difference buried in a large diff. Both belong in the merge decision.
flowchart TD
Candidate[Candidate change] --> Checks[Build, unit tests and security checks]
Checks --> Replay[Replay against reviewed expectations]
Replay -->|New mismatch| Investigate[Inspect code, recording and replay setup]
Investigate --> Candidate
Replay -->|Checked behavior matches| Review[Human review of change and evidence]
Review --> Decision[Merge decision]
What this looks like in practice
In the Cursor and Go walkthrough, two of eight requests initially differ because of stale authentication and order IDs. Carrying fresh values into later requests fixes the replay setup, and all eight match.
The CI tutorial changes GET /api/stats from 24 projects to 25. The response still returns HTTP 200, but the gate exits 3 because the body changed. Restore the handler and it exits 0.

The CI tutorial’s verification ran locally against eight synthetic mock-lab requests. The linked GitHub Actions workflow is a configuration example. The gate checks those recorded cases; other requirements still need tests and review. Performance testing needs its own workload and thresholds.
Start with the Go walkthrough, then use the CI tutorial to make a deliberate response change and confirm it fails. Keep the request-level verdict so you can inspect which response changed. Speedscale’s AI code verification covers shared Kubernetes workflows.
Related reading:
- AI Coding Agents Break What Works
- Silent Failures: Why AI Code Breaks in Production
- What AI Has Never Seen: The Context Gap in Code Generation
- Enterprise Vibe Coding
Frequently asked questions
What is dark code?
Jouke Waleson uses dark code to describe software no human has written, read, or reviewed.
Can traffic replay replace code review for AI-generated code?
No. Replay checks the requests you recorded. Keep code review, security testing and tests for new requirements.
What makes a replay useful as a regression gate?
Fail on new mismatches against a reviewed baseline. Review changes to recordings and gate inputs separately, and preserve the verdict.