- It wraps a child process running your application. - It actively monitors the stream for errors as they occur. - The instant an error is detected, the AI (via the Cursor or Claude SDK) is fed the error context and immediately attempts to patch the code on the file system. - The watcher then automatically reloads the web server/application with the fix applied.
This project is a deliberate attempt to put a high degree of trust in AI for real-time system maintenance. The goal is to maximise our precious deep flow state by eliminating annoying bugs, allowing you to focus entirely on vision.
willgdjones.com/essays/agentfix-cursor-hackathon-2026/
Try it for yourself:
npm install -g agentfix
``` │ Terminal │ │ │ │ $ agentfix npm run dev │ │ │ │ AgentFix │ │ Starting: npm run dev │ │ Using provider: Cursor │ │ Monitoring for errors... │ │ │ │ Demo server running at http://localhost:3000 │ │ │ │ TypeError: Cannot read properties of undefined │ │ (reading 'toUpperCase') │ │ at server.js:35:43 │ │ │ │ [agentfix] Error detected! │ │ Type: TypeError │ │ Message: Cannot read properties of undefined │ │ (reading 'toUpperCase') │ │ File: server.js:35 │ │ │ │ [agentfix] Fixing... │ │ I'll help you fix this TypeError. Let me first examine │ │ the server.js file to understand the context around │ │ line 35. │ │ │ │ [agentfix] read: Reading server.js │ │ │ │ I can see the issue clearly. On line 35, there's a typo: │ │ `u.nmee` should be `u.name`. The property `nmee` doesn't │ │ exist on the user objects, so it returns `undefined`, and │ │ calling `toUpperCase()` on `undefined` causes the │ │ TypeError. │ │ │ │ [agentfix] edit: Editing server.js │ │ [agentfix] Modified: server.js │ │ │ │ Restarting 'server.js' │ │ Demo server running at http://localhost:3000 │ │ │ │ The error has been fixed. The issue was a simple typo on │ │ line 35 where `u.nmee` should have been `u.name`. │ │ │ │ [agentfix] Fixed server.js │ │ Hot reload should kick in shortly... │