---
url: /examples/one-agent-on-two-harnesses.md
---
# Run one agent on Claude Code and Codex

Run Acme's changelog agent, `github.com/acme/changelog@v2.0.0`, on Claude Code with a strong model by default, and compare it with Codex now and then. You end with three targets, a default, one agent that overrides it, and a flag that switches harness for one run.

## 1. Define the targets

A target names a harness and, optionally, a model:

```sh
pandra config target set claude --harness claude-code
pandra config target set claude-opus --harness claude-code \
    --model claude-opus-5-5
pandra config target set codex --harness codex
```

## 2. Pull the agent

Pull the agent and approve it once ([what to check first](/run/trust.md)). An agent's settings need the agent in the store, so pull it before you choose its target:

```sh
pandra pull github.com/acme/changelog@v2.0.0
pandra agent trust github.com/acme/changelog@v2.0.0
```

## 3. Choose the defaults

`pandra config target use claude` makes `claude` the default target, which every agent uses unless its own settings name another. The second command gives this agent its own target, `claude-opus`:

```sh
pandra config target use claude
pandra config target use claude-opus --agent github.com/acme/changelog
```

Together, the commands write these tables:

```toml
# ~/.config/pandra/config.toml
[defaults]
target = "claude"

[targets.claude]
harness = "claude-code"

[targets.claude-opus]
harness = "claude-code"
model = "claude-opus-5-5"

[targets.codex]
harness = "codex"

[agents."github.com/acme/changelog"]
target = "claude-opus"
```

[Learn more about targets →](/configure/targets.md#targets)

## 4. Run it

Check with `--dry-run` which harness and model a run would use:

```sh
pandra run github.com/acme/changelog@v2.0.0 --dry-run \
    --prompt "Draft the changelog for v3.4."
```

```text
Run plan for github.com/acme/changelog@v2.0.0 (nothing was started)

Agent       github.com/acme/changelog (sha256:461dc2ec30ad)  approved 2026-11-15
Harness     claude-code                                 target claude-opus
Backend     host
Target      claude-opus                                 agent settings
Model       claude-opus-5-5                             target claude-opus
...
Ready to run.
```

The agent's own target, `claude-opus`, wins over the default. Run it, with Claude Code's existing login:

```sh
pandra run github.com/acme/changelog@v2.0.0 \
    --prompt "Draft the changelog for v3.4." > claude.md
```

## 5. Compare it on Codex

`--target` picks another target for one run:

```sh
pandra run github.com/acme/changelog@v2.0.0 --target codex \
    --prompt "Draft the changelog for v3.4." > codex.md
```

Pandra reuses the login Codex already has ([Codex](/harnesses/codex.md)). If Codex is not installed, a run without a terminal fails before anything starts, and `--dry-run` shows the problem and the fix:

```text
Would not start (1 problem):
  codex is not installed
    To install it:
      pandra harness install codex
```

Before starting, Pandra also checks that the harness can provide what the run needs, such as a server's transport, and fails instead of running a degraded agent.

[Learn more about choosing the harness and model →](/harnesses/choosing.md)
