# `cli.replay_arguments`

A `jadpo replay` command is given no file of a production log, one that can't be read or holds no recording, or a request the file doesn't hold.

Area 14, [Tools](/docs/tooling.md); not declinable; the next step is usually the agent's.

## Why Jadpo refuses it

`jadpo replay` runs one request a deployment recorded, so it needs the
`request.recorded` event the deployment logged for it, and to know which
one when the log holds several. Guessing among them would replay a request
nobody asked about, and replaying nothing would say nothing.

## What it looks like

The log was saved to another name than the one given:


```sh
jadpo replay production.log
```

```text
error: `production.log` can't be read
  reason: Reading it failed: No such file or directory (os error 2).
  next: Give the file the deployment's log was saved to, such as `jadpo replay recording.log` (agent)
  rule: cli.replay_arguments
  help: https://jadpo.dev/docs/errors/cli.replay_arguments
```

`(agent)` at the end of the `next:` line means your coding agent can make
the fix itself.

The same error says when the command is given no log at all, when the
log holds no `request.recorded` event, when it holds several and
`--request` doesn't name one of them, naming the ids it holds, and when
`--request` names none it holds.

## How to fix it

**If the log was saved elsewhere**, give its file, or pipe it in:

```sh
pbpaste | jadpo replay -
```

The command reads the log as text, one JSON event a line, and finds the
recording in it.

**If the log holds no recording**, the deployment doesn't record its
failing requests. Set the variable in its environment, as here for a
native deployable:

```sh
JADPO_RECORD_FAILING_REQUESTS=true build/target/app/app
```

From then on each failing request it answers is logged as
`request.recorded`, beside its `failure.rejected` or `operation.failed`.

**If it holds several**, name one by any start of its request id:

```sh
jadpo replay production.log --request req_0b1e
```

That request alone is replayed.

## Related

- [Replaying a production request](/docs/what-the-graph-and-production-evidence-add.md#replaying-a-production-request)
- [`jadpo replay`](/docs/commands-for-services-calls-email-and-stored-data.md#jadpo-replay)
