SwiftRelay

← All sprint notes

Pit Stop Checklist for Pairing on an Unreproducible Bug

Agent quick startsEN

Write the failing story before the first prompt

A bug you cannot reproduce is a story with a missing scene, and the fastest way to find that scene is to write down everything around it before any agent opens the repository. Capture the failure exactly as the user lived it: the raw error text, the timestamp, the commit hash, the runtime or browser version, the state of the data on screen, and the two or three clicks that came right before the crash. That page becomes the shared brief for every session that follows, with you and with the agent.

Next, separate what you observed from what you assumed. Bugs that hide usually hide because a plausible assumption was never tested, and a coding agent will happily inherit that assumption from your prompt. So mark it, challenge it, and let the pair treat it as a hypothesis rather than a fact.

  • Raw evidence first. Paste unedited logs, stack traces, and error messages into the brief so the agent works from the same text you saw.
  • Conditions second. Record the environment, the feature flags, the locale, the device, and anything unusual about the account or dataset involved.
  • Three hypotheses. Write the race condition, the stale cache, and the mismatched dependency as separate bullets the pair can attack one at a time.
  • Ruled-out list. Note what you already disproved so the investigation does not spend the same hour twice.

With the brief ready, the first session starts in minutes instead of drifting into a monologue. A tool such as Claude Code reads the same brief you do, and through SwiftRelay it talks to whatever model fits the job, so the investigation never depends on which assistant happens to be installed today.

Run the manual loop and the agent loop on the same trace

The side-by-side comparison matters most in the first hour. On one side is the loop you already know: reading the suspect module, sprinkling log statements, rebuilding, rerunning the failing path, and squinting at output until something looks wrong. On the other side is the same loop with a coding agent in the seat, where you keep the steering wheel while the agent takes notes, proposes instrumentation, and re-reads code paths that your eyes have already learned to skim.

The agent earns its place on the breadth work. It will scan every call site of a suspect function, trace the lifecycle of an object across modules, and notice that a callback is registered twice, while you stay focused on the one path the user actually walked. You earn your place on the context work: production configuration, customer timing, the deploy that happened between two reports, and the half-remembered incident from last quarter that only exists in a chat thread.

  • Agent-led moments. Wide code searches, generating temporary instrumentation, drafting reproduction scripts, and re-checking assumptions with fresh eyes.
  • Human-led moments. Confirming the real user path, judging which data is safe to pull, and deciding when a theory is worth a deeper dive.
  • Shared moments. Reviewing each diff together before it lands, and agreeing which hypothesis the next change is meant to test.

Keep both loops on identical tooling so the comparison stays honest. Running the agent from Claude Code, Codex, or Gemini CLI against the same working tree means the only variable is the extra pair of eyes, and routing that traffic through a single relay keeps credentials and model choices in one place while you swap between assistants mid-investigation.

Turn the guesswork into a harness the pair can rerun

When a bug appears only under real load, on one customer account, or on a Tuesday afternoon, the goal shifts from reproducing it yourself to building machinery that hunts for it. This is where a coding agent shines, because harness work is tedious to write and easy to review. Ask for a fixture that mirrors the reported data shape, a runner that loops the suspect path with seeded randomness, and structured logging that tags every entry with a correlation id so partial failures can be stitched together afterwards.

  • Seed everything. Randomised inputs become reproducible the moment they carry a seed value the pair can replay.
  • Loop the suspected race. Wrap the fragile sequence in a tight repetition and let it run while you both read other code.
  • Add a bisect script. A small script that checks out each commit in a range and runs the probe turns a week of manual stepping into one command.
  • Log state, not just errors. Record cache keys, connection ids, and feature flags at the moment of failure, because the trigger often hides in state rather than in code.

Once the harness exists, the pair changes posture: the agent watches runs and revises hypotheses, while you validate each adjustment against what production evidence suggests. Models with a deep reasoning mode handle this loop well, and having more than one available through the same pay-as-you-go relay lets you run the long speculative passes on one model and the focused code edits on another, with billing measured per token.

Compare the two working styles while the bug stays hidden

After a few sessions the side-by-side picture gets clearer. Working alone on an unreproducible bug tends to narrow your attention, because every dead end costs you personally and the temptation is to cling to the first theory that survived. Pairing with a coding agent keeps the hypothesis count honest, since the agent will happily argue for a second explanation and can run the experiment for each one without fatigue.

The agent-first style has its own failure mode, though. Left unchecked, an agent will optimise for visible progress, refactoring near the suspect code and producing plausible patches that touch the symptom instead of the cause. The guardrail is the same one used in human pair programming: the driver sets the question, and the navigator answers only that question before the next one begins.

  • Ask for evidence per theory. Every hypothesis must end in a patch, a log line, or a harness run that could disprove it.
  • Cap the blast radius. Keep speculative changes in a branch and delete the ones that fail to move the evidence.
  • Debrief after each lap. Two sentences on what changed in the brief save the next session from re-deriving the same context.

That discipline is what turns an assistant into a partner. The brief, the harness, and the hypothesis ledger are artefacts the pair builds together, and they survive the session even when the bug still refuses to appear.

The recommendation from this lap

Pair from the first hour, not from the moment you run out of ideas. A bug you cannot reproduce rewards wide coverage, repeated experiments, and a written record of what has been ruled out, and a coding agent delivers all three while you supply the production judgement it cannot infer. Let the agent drive the harness, the search, and the instrumentation, and keep the steering wheel for the user path, the data decisions, and the call on which hypothesis deserves the next run.

Keep the setup light so the habit survives contact with real work. SwiftRelay is a pay-as-you-go relay for Claude, GPT, Gemini, DeepSeek, Kimi, GLM, Qwen, Grok and other models, it works with Claude Code, Codex, Gemini CLI and any OpenAI-compatible SDK, and billing is per token. Claude Code and Gemini CLI take the bare host at https://api.fastapirelay.com, while OpenAI-compatible SDKs add /v1 to the same base, so swapping models mid-investigation costs nothing but a config line.

Sign up for SwiftRelay, open the brief you wrote before the first prompt, and put the agent in the seat on your next unreproducible bug.

Keep reading

Back for another lap?Log in