Skip to content

Targets and harness settings ​

Last updated Nov 27, 2026 View as Markdown

Targets ​

A target is a harness with a provider, a model, and a login, chosen as a unit. To create one and make it the default, and to give an agent you have pulled another target with a work login (agent settings):

terminal
sh
pandra config target set claude --harness claude-code
pandra config target use claude
pandra config secret set claude-work-token --keychain
pandra config target set claude-work --harness claude-code \
    --model claude-opus-5-5 --effort high --login subscription \
    --secret claude-work-token
pandra config target use claude-work --agent github.com/acme/notifier

The target claude-work holds a harness, a provider, a model, an effort, and a login. Two of them lead outside the target:

  1. Version: the harness claude-code runs the version that [harnesses.claude-code] pins, 2.1.317, for every target that selects it. pandra harness use claude-code@2.1.317 writes the pin (harness programs and runners).
  2. Login: the login subscription names the logical secret claude-work-token, which --secret claude-work-token gives the target (target credentials).
  3. Store: the secret lives in the OS keychain, under the service pandra, where pandra config secret set claude-work-token --keychain stored it (secret stores).
text
$ pandra config target list
TARGET       HARNESS      PROVIDER   MODEL            EFFORT     CREDENTIAL
claude *     claude-code  anthropic  (harness)        (harness)  -
claude-work  claude-code  anthropic  claude-opus-5-5  high       subscription claude-work-token

The * marks the default target, the one pandra config target use sets without --agent. (harness) marks a value the target leaves to the harness to choose.

pandra config target set on an existing target changes only the keys you give. --arg and --harness-feature are repeatable, and the ones you give replace the whole list. pandra config target remove NAME refuses while something still names the target, and lists each place:

text
$ pandra config target remove claude
error: target "claude" is still used, so it was not removed
  config.toml:4: "defaults.target" names target "claude"

To change the model for one run, use --model; flags apply on top of the target (choosing the harness and model). A target takes these keys:

KeyMeaning
harnessRequired: claude-code, codex, or pi.
providerThe model provider. The default is the harness's own; the providers each harness takes are on its page.
modelThe model to request. Without one, the harness chooses.
effortThe reasoning effort, with the levels --effort takes.
argsExtra harness arguments. Arguments Pandra supplies itself are refused.
env.<VAR>A variable for the runs that use this target, such as a gateway's URL (environment variables for agents).
harness-featuresFeatures of the harness that reach outside the run, off unless listed.

A harness feature lets a run reach something outside it, such as the connectors of your account or your browser. Each harness page lists its features: Claude Code, Codex, and Pi. A name the harness does not have is refused with the names it has.

Target credentials ​

A target's credential is the login the harness uses for the model provider, taken from a logical secret. The harness never gets the value: it gets a placeholder, and Pandra's proxy puts the value in its place only in requests to the provider's API. So the key does not appear in the agent's environment, in its logs, or in a request to any other host.

To give a target an API key, store the key, then name it with --login and --secret:

terminal
sh
pandra config secret set anthropic-api-key --keychain
text
$ pandra config target set work --harness claude-code --login api-key --secret anthropic-api-key
wrote env.ANTHROPIC_API_KEY = { secret = "anthropic-api-key" } to targets.work (anthropic api-key)

On a terminal, you can leave out --secret, and Pandra asks for it:

text
$ pandra config target set work --harness claude-code --login api-key
Target "work" logs in with anthropic api-key (ANTHROPIC_API_KEY)
? How do you want to provide it? (arrows move, enter chooses, q cancels)
> Use a saved secret
  Type or paste the value
  Give its source

Pandra offers the secrets you registered, a value you type, which it stores in the OS keychain, or a source, such as a 1Password reference or a command, which it reads once as pandra config secret set does. A typed value or a source becomes a new secret, and Pandra asks its name last, with work-api-key as the default (Escape goes back to the question before). After a typed value and the default name, Pandra prints:

text
Target "work" logs in with anthropic api-key (ANTHROPIC_API_KEY)
✓ How do you want to provide it? Type or paste the value
✓ Value to store in the OS keychain: ********
✓ Secret name: work-api-key
registered secret work-api-key (keychain pandra/work-api-key)
wrote env.ANTHROPIC_API_KEY = { secret = "work-api-key" } to targets.work (anthropic api-key)

Pandra writes nothing before your last answer, so q at a list, or Ctrl-C at any question, leaves the keychain and the file as they were. Without a terminal, with --no-interactive or PANDRA_NO_INTERACTIVE, or with --json, --login needs --secret.

--login takes api-key, subscription, or gateway, and writes the variable that the harness reads for that method. Each harness page lists its methods and variables: Claude Code, Codex, and Pi. A gateway needs --base-url, so that its token goes only to the gateway.

The target claude-work above gets its token this way in every run:

  1. Read: when the run starts, Pandra reads claude-work-token from the OS keychain and gives it to Pandra's proxy, which runs inside Pandra for this run only.
  2. Request: the harness gets a placeholder in CLAUDE_CODE_OAUTH_TOKEN, and sends its requests through the proxy.
  3. Token: in a request to the provider's API, api.anthropic.com, the proxy puts the token in place of the placeholder.
  4. Placeholder: a request to any other host passes through with the placeholder, so a tool that prints its environment or sends it elsewhere gets nothing usable.
  • The credential is the run's only one: Pandra removes the harness's other credential variables from the run. Without a credential, your shell's variables or your existing harness login are used.
  • On a terminal, --secret without --login asks which method to use. A credential written as text is refused, with the commands that store it.
  • A login that no harness page lists, such as Amazon Bedrock's AWS_BEARER_TOKEN_BEDROCK, is an ordinary variable: pandra config set --target NAME env.<VAR> --secret SECRET. It reaches the run as its real value, without the proxy.

Security

The proxy keeps the key out of what the agent can read, but it does not stop the agent from using the key: the agent's own requests to the provider's API go through the proxy too. The agent also runs as you, so it can read your secret stores as you can. With secret-proxy = false on a harness (below), the harness gets the real value, and the agent and its tools can read it.

Harness programs and runners ​

Pandra installs harness versions itself and can pin the one every run uses (installing and pinning versions). [harnesses.<name>] holds that pin and the other settings of one harness for every run of it, whichever target selects it:

~/.config/pandra/config.toml
toml
[harnesses.claude-code]
version = "2.1.317"

[harnesses.claude-code.env]
DISABLE_TELEMETRY = "1"

[harnesses.claude-code.settings]
theme = "dark"

[harnesses.codex.settings]            # added to the prepared home's config.toml
analytics.enabled = false
KeyMeaning
versionRun this version of the harness, which Pandra downloads on first use. pandra harness use claude-code@2.1.317 writes it.
pathRun this binary. pandra harness use claude-code --path PATH writes it.
env.<VAR>A variable for every run of this harness, as a literal value.
settingsKeys of the harness's own settings file, by the harness's names; each harness page names the file. Keys Pandra sets to keep runs isolated are refused with the reason.
permission-modeauto, bypass, or read-only for the runs of this harness that neither --permission-mode nor an agent setting decides (which setting wins).
secret-proxytrue (the default) or false. With false, the harness gets secrets as their real values instead of placeholders (how values reach servers).

harnesses.downloads = "manual" stops automatic harness downloads (which installation runs), and [runners] says where the programs that MCP servers need are (runners and what is pinned).

Released under the Apache License 2.0