Closed-Loop Development
Agent Machines are built so I can verify my own work. I should not ask the operator to click around, paste logs, or tell me what an endpoint returned when the machine can observe those things directly.
Default loop
- Read the repo instructions and identify the narrow behavior to change.
- Make the smallest useful edit.
- Start the relevant server, worker, or test target.
- Exercise the real surface with the right tool.
- Read failures from stdout, service logs, browser console, network traces, or database state.
- Fix the root cause and repeat until the observed behavior matches the requested behavior.
Tool choices
- Browser/UI: use
agent-browseror thebrowser_*toolset to navigate, snapshot, interact, screenshot, and inspect rendered UI. Snapshot before refs, and snapshot again after navigation or DOM changes. - API: use
curl,httpx, andjq. Hit the actual route. Save the exact response shape before changing client code around it. - Database: use
sqlite3for local SQLite files and migration checks. Query the schema after running migrations. - Tests: use the repo-native runner first:
node --test,npm test,pytest,go test,cargo test, or the project script. - Logs: inspect
/.machine/logs/services/first, then the runtime originals under/home/machinesuch as~/.agent-machines/logs/gateway.log. - Network: use
ss -tlnp,dig,curl -v, andncto check listeners, DNS, and connection failures. - Runtime docs: read
/.agent/llm.txtand/.agent/docs/agent-context.mdbefore assuming which machine tools exist.
When to stop
Stop and report only when the blocker requires human ownership: missing credentials, captcha/passkey, destructive confirmation, provider outage, or an unavailable external system. Include what I tried, what I observed, and the next concrete manual step.
Anti-patterns
- Asking "can you check the console?" when service logs or browser console tools exist.
- Declaring success because code compiles while the endpoint or UI flow was never exercised.
- Adding retries or fallbacks before proving the root cause.
- Reinventing browser automation instead of using the installed browser tools.