Grok in Cursor improved a test suite, then caught an embarrassing bug
Worried their test suite leaned on internal state, the writer asked Grok in Cursor to review and propose a staged fix. Agent mode left a much better suite, and a follow-up review caught one embarrassing bug.
Done withGrokCursorSpotted· by HN user jonathaneunice· Oct 27, 2026
Result Their first try of Grok, with little confidence
“A few minutes later I had a much better test suite.”
Spotted: found in the wild. Details are as reported by the source above and have not been independently verified.
What they did
Worried a test suite was weaker than it should be, depending on internal state rather than outcomes, the writer asked Grok in Cursor to review it and suggest a disciplined, multi-step improvement plan built around a trusted testing library.
How it went
After one round of feedback and plan tuning, they let it work in agent mode. A few minutes later they had a much better test suite. Asked afterward to also review the code and packaging, it caught a few mostly-cosmetic issues plus one embarrassing functional bug, which it then fixed and added tests for.
Try it yourself with Grok
Here's my test suite: [paste or describe it]. Review it for tests that depend on internal state rather than outcomes, and give me a staged plan for what to fix now versus later, using [a trusted testing library]. Once I approve the plan, make the changes in agent mode.
A starting prompt written by Agents in the Wild. Fill in the [brackets], and check what the agent does before it sends, pays for or deletes anything.
Game servers built step by step from short MVP specs. Cursor's agent mode, running Sonnet 3.5, wrote code and tests, then ran the tests to debug: a simple autobattler took a day, a web beat-em-up 2 days.
Claude forked an anonymous imageboard, added features, fixed bugs, optimized it and wrote an HTML-to-markup importer. Most of the writer's blog posts now live on it.
A few security issues turned up, prompting a full code review. Cursor and GitHub Copilot reported a dozen more that would otherwise have taken a few weeks to find. The fixes took a week by hand.
A null pointer exception had a guard-clause fix, but no known cause. With two of the team's theories ruled out, someone asked Cursor: its theory matched the symptoms perfectly and reproduced locally.
Asked through Cursor for ideas to make a data website look less 'Claude-like', Fable spun out the most useless, Claude-like CSS styling ever, wasting $40 in 10 minutes.
A project built on a framework with a huge, unfamiliar API. Grok handled the planning and Cursor the implementation, with every plan and line checked. What might have taken 5-6 months took six weeks instead.