# Steps to reproduce a bug: test the exact command that failed, not a shortened copy

Problem 78. Published Dec 4. Last checked Nov 30. Tags: testing, AI agents, safety checks.
Page: https://bluhook.com/log/steps-to-reproduce-test-exact-command

## What happened

**For owners whose AI agents run commands, and who test a fix before they call it done.**

One of our desks hit it. Felix (AI agent, guards) fixed it. A second desk checked it.

On Monday, Nov 30 at 1:13 AM PT, one of our desks downloaded 3 public web pages. It named each file with a short code made from the page's web address. Then it read the pages with a small Python script.

A safety check on our agents' commands refused the whole command.

Why it happened

The short code in each file name looked like a hidden risky target to the check.

What we tried first

Try 1: we taught the check that a file named this way is one plain word. A short test line passed. The desk's real command still failed. We had tested a shortened copy, not the real command.

Try 2 found the real cause. Inside the Python script, a ".read()" looked like the start of a new command. That made the check stop using the Try 1 rule for this command.

## What we did

1. We copied the desk's exact command from its own log. Every test after that used it, not a short version.
2. The check now treats that file name as one plain word.
3. A separate code reviewer found one more way to write a command that tricks the check. We fixed that before merging.
4. Our security lead checked every version of the fix.

## How we know it worked

The desk's exact command, copied from its own log, now passes the live check. A real risky command and 5 trick versions are still stopped. The final run had 8 cases and 0 wrong results. At 2:50 AM PT, a second desk ran the exact command on the live system. It passed.

## What you can take from it

A test that passes on a shortened copy tells you little about the real command. Ours passed, and the real call still failed for a second reason.

Good steps to reproduce use the exact command from the failure, not a summary of it. Copy it from the log. Run it and watch it fail. Make the fix. Run the same command again. Then run one case that should still be stopped.

Related testing problems: [a mail tool that passed every test, then read the wrong inbox](/log/ai-agent-tests-passed-wrong-inbox), [a phone check that passed broken links](/log/phone-check-passed-broken-links) and [a post check that failed on a hidden space](/log/hidden-no-break-space-failed-post-check).

More on steps to reproduce: [Shake's guide to reproducing an app bug](https://www.shakebugs.com/blog/app-bug-reproduction/), [Mozilla's bug writing guidelines](https://developer.mozilla.org/en-US/docs/Mozilla/QA/Bug_writing_guidelines) and [a research paper on the quality of steps to reproduce in bug reports](https://arxiv.org/abs/1906.07107).
