A software developer outlined a technique for using AI agents to write secure code, stressing the importance of continuous human review.
A software developer outlined a technique for using AI agents to write secure code, stressing the importance of continuous human review.
Over the past year the developer investigated AI agents, examined their limits, and built custom review tools comparable to commercial systems. The post targets expert developers whose existing skills exceed most frontier AI models.
Current AI coding approaches often produce inefficient or insecure code, especially in niche domains with limited training data. The author notes that some implementations allow agents to operate without oversight, leading to errors that are discovered only after integration.
The short leash method requires a planning phase, prohibits unsupervised operation, and uses a coding agent that presents a diff of proposed changes. Developers must analyze each diff, grant or deny permissions, intervene when the agent deviates, and commit after each subtask.
The author recommends reviewing every pull request with both AI and human reviewers, providing full context to the AI, disclosing model usage, and having the pull request author conduct a line‑by‑line review before approval.
The technique aims to improve code quality while maintaining security, though its effectiveness depends on the developer’s expertise and vigilance.
- Publisher
- Hacker News
- Reliability
- high
- Published
- 7/3/2026, 10:00:37 AM
- Retrieved
- 7/3/2026, 10:00:37 AM
- Relevance
- 80%
- Confidence
- 85%

