---
title: Find the root cause before you fix it
description: Reproduce the defect, establish why it happens, then apply a bounded fix.
url: https://openplanr.dev/docs/prompts/investigate-first
updated: 2026-10-06
related:
  - https://openplanr.dev/docs/prompts/diagnose-without-fixing.md
  - https://openplanr.dev/docs/prompts/track-down-a-flaky-test.md
  - https://openplanr.dev/docs/prompts/diagnose-setup.md
---

# Find the root cause before you fix it

Reproduce the defect, establish why it happens, then apply a bounded fix.

## Prompt

Claude Code:

```text
/investigate sign-in links expire after 30 seconds instead of 15 minutes. Reproduce it first, then fix it with a test.
```

If /investigate runs another command, use /planr:investigate.

Codex:

```text
$investigate sign-in links expire after 30 seconds instead of 15 minutes. Reproduce it first, then fix it with a test.
```

With the OpenPlanr plugin for Codex, use $planr:investigate.

Cursor:

```text
@planr-investigate sign-in links expire after 30 seconds instead of 15 minutes. Reproduce it first, then fix it with a test.
```

Cursor applies the planr-investigate rule when you mention it in chat.

Parts to fill in, shown with their example text:

- The bug you see: sign-in links expire after 30 seconds instead of 15 minutes

## Why this works

Investigate starts from the smallest reproducible case and tests competing causes before it names one. It changes code only when you ask for a fix, and then runs focused regression checks.

## Make it stick

[OpenPlanr Investigate](https://openplanr.dev/docs/skills/investigate.md)
