{"id":"2062199026544787576","url":"https://x.com/ericzakariasson/status/2062199026544787576","text":"","author":{"name":"eric zakariasson","username":"ericzakariasson","avatarUrl":"https://pbs.twimg.com/profile_images/1841151626456801283/HnXqy3TQ_200x200.jpg"},"createdAt":"Wed Jun 03 15:45:36 +0000 2026","engagement":{"replies":25,"retweets":41,"likes":741,"views":112278},"article":{"title":"Don't let your agent guess, give it runtime context","previewText":"If you've ever watched an agent try to fix a bug, you've watched it guess. It reads the code, comes up with a theory, makes an edit, and hopes. Sometimes it's right. A lot of the time you get a fix","coverImageUrl":"https://pbs.twimg.com/media/HJ2avu_aoAA2ZMp.jpg","content":"If you've ever watched an agent try to fix a bug, you've watched it guess. It reads the code, comes up with a theory, makes an edit, and hopes. Sometimes it's right. A lot of the time you get a fix that looks confident and quietly hides the real bug.\n\nDebug Mode is what we built for that. Instead of sitting there reasoning about the code, the agent goes and gets evidence about what the code does when it runs.\n\nHere's the loop\n\n1. Agent comes up with multiple hypotheses, and starts to work on the most plausible first\n\n1. Then, logging is added to test one hypothesis (without touching implementation)\n\n1. A little debug server collects the runtime output to .cursor/debug.log while your program runs.\n\n1. You reproduce the bug, and agent can now read the logs and understand what happened instead of having to guess\n\n1. Cursor finds the root cause in the logs, makes the fix, and pulls out the logging it added.\n\nHere it is on a real bug, sped up to about a minute:\n\n## How the team uses it\n\nSome interesting things that we've solved internally with debug mode:\n\n- A race condition that hit 1 in 20 runs. It was corrupting git metadata in our best-of-N runs. Debug Mode pinned it down in under an hour\n\n- A memory leak, traced in one pass. It came down to a misuse of our frontend framework. The fix was a single line.\n\n- A native crash deep in C++. An Electron crash people would normally route around. The logs made it findable.\n\n- An SSR flicker that had been given up on. A rendering bug nobody wanted to touch, fixed once the agent could see what the page was doing at runtime.\n\nTry it with Shift+Tab (it's in the CLI too, via /debug).\n\nI'm sure people are using it in ways I haven't thought of, so let me know!"}}