Use an agent to trace a crypto bug from a failing test
A cryptography engineer had Claude Code inspect a failing Go implementation and pinpoint three low-level signing bugs.
- What they did
- Filippo Valsorda ran Claude Code, using Opus 4.1 without a system prompt, on a new Go ML-DSA implementation. He gave it the test command, the code path, the broken behavior, and a request to think carefully. The agent read through the code, followed the execution path, and tried out a small test to check one idea. He repeated the same approach for two earlier signing issues, starting a new session each time.
- How it went
- The agent identified all three bugs immediately, without outside help. One verification problem was found in minutes: the high bits were being counted twice. Its suggested patches were not good enough to keep, so Valsorda rewrote the fixes himself.
- Tips
- Give the agent a narrow failing test and clear file location. For separate bugs, start over with a fresh session, and treat its answer as a clue to investigate, not a patch to apply blindly.
Try it yourself with Claude Code
I have a failing test in [path/to/code] for [describe the bug or wrong output]. Use [test command] to reproduce it, inspect the implementation, and compare it with [reference code, spec, or test vectors]. Trace the root cause carefully, and if needed, run a small focused test to check a hypothesis. Stop before changing any files and show me the exact fix you would make; I’ll approve it before you edit anything.
Fill in the [brackets]. Agents can make mistakes, so review anything before it is sent, paid or deleted.
Get 3 agent uses like this every morning
With the day's top AI news. Free, and one click to unsubscribe.
Related agent uses
Build a robot arm CAD package from a single request
A text-to-CAD setup turned one prompt into a multi-part robot arm model with motion logic, a viewer, and export files.
Validate a circuit model with scope measurements
Claude Code can compare a SPICE run with oscilloscope readings from the real circuit.
Map a desktop app’s platform layers for Linux support
They used Claude to inspect a minified desktop app and trace why it depended on macOS, then outlined three possible Linux paths.
Have Claude Code inspect a codebase for latent security flaws
A researcher pointed Claude Code at Linux kernel files and used it to flag serious bugs, including a 2003 NFS heap overflow.
Use a patch diff to map a sandbox exploit path
A researcher had Claude Code study a PaperCut NG fix, rebuild the flaw chain in a lab, and reach working code execution.
Inspect a laptop BIOS dump for hidden menu checks
A Reddit user had Claude Code analyze a BIOS dump, patch the signature gate, and expose hidden firmware settings after flashing the edited file.