Skip to content

How to write a bug report that a person or a coding agent can reproduce

Steps, expected result, actual result, environment and evidence. A template and an example for bug reports that lead to a fix instead of a question.

Published by Contextingo.

The first thing anyone does with a bug report is try to reproduce it. If that fails, the report goes back with questions. An agent behaves the same way, only faster.

Template

Summary: one line
Steps to reproduce:
 1. ...
 2. ...
Expected result:
Actual result:
Environment: version, OS, browser, configuration
Evidence: error text, log lines, screenshot
Frequency: always, sometimes, once

Tips

  • Copy the exact error text; do not paraphrase.
  • Give the smallest set of steps that triggers it.
  • Say what changed recently: a release, a setting, a dependency.
  • Attach input data, with private parts removed.
  • Say what you already tried.

After the fix

The test that reproduces the bug should live on in the test suite. Record the cause as a finding with its source. See test-first with a coding agent.

Questions

Good to know.

What if I cannot reproduce it every time?

Say so, and note what you saw when it happened, with the time, so logs can be matched.

Can an agent write the report?

It can draft one from logs. A person checks that the steps are right.

Nothing learned is lost. Nothing unchecked is done.