> ## Documentation Index
> Fetch the complete documentation index at: https://docs.harborframework.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Regrade

> Run an updated verifier against recorded outputs without rerunning the agent.

<Note>
  Regrade is recommended when only the verifier changes and the task uses a
  separate verifier. The agent phase is not rerun.
</Note>

## Regrade a job

```bash theme={"system"}
harbor job regrade "jobs/<job>" -p path/to/updated-task -e modal
```

`-p` accepts a task directory or a directory of tasks. Harbor matches tasks to
source trials by task name. Repeat `-p` to provide multiple locations.

## Regrade a trial

```bash theme={"system"}
harbor trial regrade "jobs/<job>/<trial>" -p path/to/updated-task -e modal
```

The updated task must have the same name as the source trial's task.

## Regrade from Harbor Hub

Use a Hub job or trial UUID instead of a local path.

```bash theme={"system"}
harbor job regrade deeac1d1-9588-422f-8d8a-d504ec9fae14 -p path/to/updated-task
harbor trial regrade 8f3c2a9e-1b4d-4c6f-9e2a-7d5b8c1f0a3e -p path/to/updated-task
```

## Requirements

* The source is a completed, single-step trial with readable `result.json` and
  `artifacts/manifest.json` files.
* The updated task uses a [separate verifier](/core-concepts/tasks/separate-verifier).
* Every artifact required by the updated verifier was collected by the source
  trial and still exists.

Using a separate verifier for the source task is a good practice because it
already grades from recorded artifacts. It is not required: a shared-verifier
source works if it recorded every input needed by the updated verifier.
Multi-step trials are not supported.

## How it works

For each source trial, Harbor:

1. Copies the recorded outputs into a new trial.
2. Builds the updated verifier environment.
3. Runs verification and writes a new result.

No agent environment is started, so regrading needs no agent credentials and
incurs no new agent cost.

## Options

| Flag                   | Description                                          |
| ---------------------- | ---------------------------------------------------- |
| `-p, --task-path`      | Local verifier task. Repeatable for jobs.            |
| `-t, --task`           | Registry verifier task for jobs. Repeatable.         |
| `-d, --dataset`        | Dataset of verifier tasks for jobs. Repeatable.      |
| `-e, --env`            | Verifier environment provider. Defaults to `docker`. |
| `--ve, --verifier-env` | Verifier environment variable. Repeatable.           |
| `--verifier`           | Custom verifier import path.                         |
| `--verifier-kwarg`     | Custom verifier argument. Repeatable.                |
| `-o`                   | Output parent directory.                             |

Job regrades also support `-n, --n-concurrent` and `--job-name`. Trial regrades
support `--trial-name`.
