---
url: /examples/pin-a-harness.md
---
# Pin the harness version

Install a version of Claude Code and keep every run on it, so that your runs, and every machine that uses the same configuration file, such as CI's, run the version you tested. You end with a pin in your configuration and the command that removes it. The version numbers in the samples are examples; yours differ.

## 1. Install a version

`pandra harness install` installs the newest stable release, and says which installation runs use until you pin it:

```sh
pandra harness install claude-code
```

```text
Installed claude-code 2.1.326
  In use: claude-code 2.1.285 on PATH
  To use 2.1.326 in every run:
    pandra harness use claude-code@2.1.326
```

To install another version, name it, as in `pandra harness install claude-code@2.1.285`.

## 2. Pin it

Run the command that `pandra harness install` printed, then list the installations:

```sh
pandra harness use claude-code@2.1.326
pandra harness list
```

The pinned one shows `yes (pinned)` under `IN USE`:

```text
HARNESS      VERSION  SOURCE   PANDRA SUPPORT  IN USE
claude-code  2.1.326  managed  yes             yes (pinned)
claude-code  2.1.285  PATH     yes             no
```

`pandra harness use` writes the pin to your configuration file, so a machine that uses the same file runs the same version, and downloads it on its first run.

## 3. Run another version once

To try another version in one run, without changing the pin, name it with `--harness-version`. Pandra downloads it on first use:

```sh
pandra run . --harness-version 2.1.285
```

## 4. Stop pinning

`pandra harness unuse` removes the pin, and runs use the harness on `PATH` again, or the newest managed one when none is on `PATH`:

```sh
pandra harness unuse claude-code
```

[Learn more about installing and pinning versions →](/harnesses/choosing.md#installing-and-pinning-versions)
