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
Create a 5-DOF arm with FreeCAD and Claude Code
They used Claude Code to generate, print, and assemble a servo-powered arm, then added voice and camera control.
Validate a circuit model with scope measurements
Claude Code can compare a SPICE run with oscilloscope readings from the real circuit.
Audit a game’s checks before changing the bytes
A developer used Claude Code with Ghidra to uncover every gate behind a 2013 Disney Infinity restriction and patch around it.
Use Claude Code for thesis work and dataset analysis
People used Claude Code with project instructions and tailored skill files to keep research context while drafting theses, reviewing papers, and processing large datasets.
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.
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.