Coding with Agents:
Harnesses, Guardrails & Verification.
01.From Chat Prompt to Terminal Agent
The transition from copilot-style code completion to autonomous coding agents represents a major shift in developer leverage. An agent operates inside an iterative execution loop:
02.Claude Code vs OpenCode: My Experience
I regularly run two leading agent environments for building my web applications:
Unrivalled contextual reasoning over large codebases. Superb at cross-module refactors, finding obscure type mismatches, and respecting existing repository architectural patterns.
Complete flexibility. Allows routing different tasks to specialized models (e.g. DeepSeek for rapid unit tests, Claude 3.5 Sonnet for system design) while keeping tools fully customizable.
03.The Golden Rule: Deterministic Verification
An agent left without strict automated verification is dangerous. It will hallucinate working code that compiles but silently breaks subtle edge cases.
- Test Verification First: Never accept an agent's completion claim until `vitest run` or `npm run check` exits code 0.
- Atomic Commits: Require the agent to make small, reviewable git commits rather than massive monolithic rewrites.
- Sandboxed Permissions: Lock down sensitive production environment files and secrets from tool exposure.
The 90-Second Rule of Thumb:
Treat a coding agent like a brilliant junior engineer: give it crystal-clear acceptance criteria, confine its edits to designated files, and let automated tests be the judge.