# 30.5 Configuration that travels (/building-ai-workers/shipping-claude-applications/configuration-that-travels)

---
type: Document
title: "30.5 Configuration that travels"
description: "The coding agent's configuration and the worker's, what a run reads when you set nothing, which model wins when a file and a variable disagree, and how plugin versions travel."
status: stable
order: 330.05
ksor:
  owner: team:panaversity
  audience:
    - public
  approval:
    by: process:panaversity
    at: 2026-11-30T10:58:03Z
chapter: '30'
part: III
expert_status: builder-only
concepts: [ "30.5" ]
last_verified: '2026-11-30'

sources:
  - id: agent-sdk-system-prompts
    title: Modifying system prompts (Claude Agent SDK, verified 2026-11-30)
    resource: https://code.claude.com/docs/en/agent-sdk/modifying-system-prompts
  - id: agent-sdk-claude-code-features
    title: Use Claude Code features in the SDK (Claude Agent SDK, verified 2026-11-30)
    resource: https://code.claude.com/docs/en/agent-sdk/claude-code-features
  - id: claude-code-settings
    title: Settings files and precedence (Claude Code docs, verified 2026-11-30)
    resource: https://code.claude.com/docs/en/settings
  - id: claude-code-model-config
    title: Model configuration (Claude Code docs, verified 2026-11-30)
    resource: https://code.claude.com/docs/en/model-config
  - id: plugin-dependencies
    title: Plugin dependencies (Claude Code docs, verified 2026-11-30)
    resource: https://code.claude.com/docs/en/plugins/dependencies
generated:
  at: 2026-11-30T10:58:03Z
  by: esl-rewrite/1.2.0+ksor.1
trust_tier: unverified
build_id: sha256:d6ce3f28a2cf8e492a60bae1b426b7cc6466e35e83d70c3b9763db2c55009f4b
dirty: true
ksor_version: 0.0.60
---

**In everyday life.** A shop has two sets of rules. The staff handbook tells each assistant how to work, and each shift adds its own habits. The price list tells customers what they pay, and it must be the same whoever is on shift. When the list leaves an item out, each assistant charges what they remember, and the same item costs a different amount each day. In this section, the price list is the worker's own configuration. The handbook and the habits are the coding agent's files on each machine, and the remembered price is a default.

**What you will learn.** You practice this in Lab 30, Task 4.

- Which two configurations does a project have?
- What does a run read when you set nothing?
- Which model runs when a file and a variable disagree?
- How do plugin versions travel?
- What goes in row 5 of the table?

**Why it matters.** The worker's code is the same in all three environments. What it reads around the code is not. A setting you never wrote is not empty. A default fills it, and each machine's default can differ.

**At work.** It is Monday, May 17, 2027, on your laptop. <!-- EDITOR: proposed in the spec, not yet in specs/labs/part-2-facts.md (the chapter's clock, Monday, May 17 and Tuesday, May 18, 2027) --> The change adds the extraction prompt's next version, which Ana tried first in her Claude project. <!-- EDITOR: proposed in the spec, not yet in specs/labs/part-2-facts.md (Ana tried the next extraction prompt in her Claude project first) --> Before you open the pull request, you ask one question of each place the request runs. Which files does this run read, and which of them did I write for it?

### Which two configurations does a project have?

**The coding agent's and the worker's. Only the worker's should reach staging and production.** Here, a **configuration** is everything a run reads besides its code: files, settings and environment variables. A project like Brightline's has two, and they are read by different programs.

| | The coding agent's configuration | The worker's configuration |
| --- | --- | --- |
| What it holds | `CLAUDE.md` or `AGENTS.md`, the settings files, plugins, and environment variables such as `ANTHROPIC_MODEL` | `config/prompts.yaml`, the prompt files it names, `agents/ap-worker.md` and its lock file |
| Who reads it | Claude Code, on your laptop or in a CI job | The worker's code, the portal's morning job and the hosted agent |
| Where it belongs | Your laptop, and CI's review job | Development, staging and production |

The coding agent's side follows [12.4](../agentic-coding/rules-the-agent-reads.md): "keep one short, true `AGENTS.md` in the repository". The worker's side follows [23.6](../hosted-agents/what-travels.md): "The settings file does not travel." The hosted worker reads no settings file at all.

`config/prompts.yaml` holds one entry for staging and one for production. Tuesday's change adds the model and its fallbacks, so a difference between environments is a difference you can read in one file. This is the file as Lab 30 leaves it:

```yaml
# config/prompts.yaml: one entry for each environment, as Lab 30 leaves it
staging:
  prompt: prompts/extract-invoice.v[N].md   # the prompt version this place runs
  model: "[model id]"                       # the pin (added Tuesday)
  fallbacks: []                             # models it may end on, after the pin (30.4)
  workspace: staging                        # the only ids it reads (30.3)
production:
  prompt: prompts/extract-invoice.v[N].md
  model: "[model id]"
  fallbacks: []
  workspace: production
  fileExpirySeconds: [n]                    # how long an uploaded file is kept (30.2, Task 4)
```

<!-- OPEN: the file's added keys (model, fallbacks, workspace, fileExpirySeconds) are the spec's proposal (point 23) as round 2 changed it, not yet fixed by the lab. The kit's starting file is the plan's, a prompt for each of staging and production. Development's pin stays in Lab 21's `src/loop/config.json`, and the key path inside its `models` block is the kit's to name. The extraction prompt's file name is not fixed by Labs 24 to 29 (part-2-facts O24.9 proposes prompts/extract-invoice.v1.md). The model id waits for Chapter 29's release plan. Fill each bracket from the kit. -->

How a prompt version is kept, logged and promoted is [25.1](../prompts-and-structured-output/a-prompt-is-code.md)'s rule: "a prompt reaches production only as a named version that the suite has read". This file is where each environment names that version.

### What does a run read when you set nothing?

**On the Claude Agent SDK, everything Claude Code would read on that machine.** An SDK run takes a list called `settingSources`, which says which settings files it loads. Anthropic's page is plain about the default: "Omitting `settingSources` is equivalent to `["user", "project", "local"]`."[^agent-sdk-claude-code-features] And `CLAUDE.md` comes with them: "Default `query()` options enable both sources, so CLAUDE.md loads automatically."[^agent-sdk-system-prompts]

So an SDK run with the list left out reads your own `~/.claude` files on your laptop, and whatever the CI runner holds in CI. The same code reads different rules in each place, and no file in the worker's configuration says so.

The kit sets the list empty. Lab 22's `claude-agent.ts` has `settingSources: []`, and the line's comment reads "read no settings files from this computer", [22.9](../agent-sdks/what-an-sdk-still-leaves-to-you.md)'s rule. That one line moves the run from the left side of the table above to the right side. The extraction itself is one Messages API call, which reads no settings file anywhere.

### Which model runs when a file and a variable disagree?

**A flag at startup wins, then an environment variable, then a settings file.** The order of the settings files, highest first, is in [12.8](../agentic-coding/both-ai-vendors.md#the-details-tool-by-tool). This chapter adds three facts that change which model a run ends on.

- *A flag beats a variable.* Claude Code's model order, highest first, is `/model` during a session, `--model` at startup, the variable `ANTHROPIC_MODEL`, the `model` key in settings, and last `ANTHROPIC_DEFAULT_MODEL`.[^claude-code-model-config]
- *A variable beats a file.* "`ANTHROPIC_MODEL` exported in your shell applies over the `model` key from any file, while `ANTHROPIC_DEFAULT_MODEL` applies only when no file sets `model`."[^claude-code-settings]
- *A managed model is not a lock.* Managed settings are the ones your organization sends to every computer. Even there, "A managed `model` is a starting default, not a lock".[^claude-code-settings] The locks are two lists, `availableModels` and `deniedModels`: the models a person may choose, and the ones they may not. Naming one model only sets where a session starts.

These facts are about Claude Code, the coding agent. The worker's model is the pin in `config/prompts.yaml`, which the worker's code passes on every request. So a variable on the laptop does not choose it. That is one more reason to keep the two configurations apart.

### How do plugin versions travel?

**By the range you write. Without one, each install takes the newest version.** A plugin's manifest can list `dependencies`, other plugins it relies on ([16.10](../skills-and-plugins/both-ai-vendors.md)). Anthropic's page says: "Each dependency tracks the latest version its marketplace provides unless you declare a version constraint".[^plugin-dependencies] A **version range** is a rule such as `^2.0` or `~2.1.0`, which allows any version inside it. Four results follow:[^plugin-dependencies]

| You write | What installs |
| --- | --- |
| No range | The latest version the marketplace has, on the day of the install |
| A range, such as `^2.0` | "the highest git tag that satisfies this range" |
| Two plugins whose ranges cannot both hold | The install fails with "`has conflicting version requirements`", and what was installed stays as it was |
| An exact pin, `=2.1.0` | "The dependency stays at `2.1.0`. Auto-update skips newer versions" |

So a range is a value that can differ by place. Your laptop installed a dependency last month. CI installs it fresh on every run. Both obey `^2.0`, and they can still hold different versions. Where two environments must run the same plugin, pin it exactly, and change the pin in a pull request.

### What goes in row 5 of the table?

**For each environment, which configuration the run reads, and a file that proves it.** The worked run fills these cells:

- *Development.* The worker's configuration: `config/prompts.yaml`, the prompt version in its `staging` entry, because the laptop runs with the staging key, and `settingSources: []`. Proof: `src/sdk/claude-agent.ts#settingSources`. If someone deletes that line, the check finds the cell and the file in disagreement.
- *Staging.* The portal's morning job (the extraction) and the hosted worker read only the worker's configuration. Proof: for the extraction, the prompt file that `config/prompts.yaml#staging.prompt` names exists and the suite's report names that version. For the hosted worker, `claude-lock.staging.json`.
- *Staging, CI's review job.* This job runs Claude Code on the pull request. It is not the worker, and it reads the coding agent's configuration. Its workflow passes `--model` in `claude_args`, which beats the settings file ([30.7](#307-claude-in-ci-and-the-release-pipeline)). Proof: that `claude_args` line in the workflow file.
- *Production.* The same as staging. Proof: for the extraction, the prompt file that `config/prompts.yaml#production.prompt` names exists. For the hosted worker, waiting: `claude-lock.production.json`, made by the production apply. And by a person: the **run log**, the portal's record of each morning run, names the prompt version of every answer. It holds ids and versions, not the content of questions or answers.

<!-- FIGURE 30.5: "Two configurations." Two tall boxes side by side. Left box, labeled "The coding agent's": four small boxes stacked inside it, top to bottom, "CLAUDE.md or AGENTS.md", "settings files", "plugins", "environment variables". Beside the stack, a small label "order: see 12.8". One arrow inside the left box, pointing from "environment variables" up to "settings files", labeled "ANTHROPIC_MODEL beats the file's model". Under the left box, a note: "settingSources left out loads these". Right box, labeled "The worker's": four small boxes stacked inside it, "config/prompts.yaml", "the prompt version", "agents/ap-worker.md", "claude-lock.<environment>.json". Below both boxes, three circles labeled "development (the laptop)", "staging", "production", and a fourth, smaller circle off to the left, labeled "CI's review job (not the worker)". Arrows point up from "staging" and from "production" to the right box only. From "development", one arrow points up to the right box, and a dashed arrow points up to the left box, labeled "only if settingSources is left out". From "CI's review job", one arrow points up to the left box only, labeled "--model in claude_args beats the file". Alt text must say: the coding agent's configuration holds CLAUDE.md or AGENTS.md, settings files, plugins and environment variables, in the order 12.8 gives, with ANTHROPIC_MODEL beating a file's model; the worker's holds config/prompts.yaml, the prompt version, the agent file and its lock file; staging and production read only the worker's; an Agent SDK run with settingSources left out also reads the coding agent's files; CI's review job, which runs Claude Code on the pull request, reads the coding agent's configuration, is not the worker, and sets its model with --model in claude_args. -->

*Figure 30.5. Two configurations in one repository. Staging and production read only the worker's. A run that leaves `settingSources` out reads the coding agent's files too. CI's review job is not the worker, and reads the coding agent's.*

**The operating rule:** let each run read only the configuration written for it. Set every default that loads files to empty, pin what may change, and write each environment's value in row 5.

**Do this now.** Ask your coding agent to find what each run reads. Copy this line:

> List every place this project starts a model run: an SDK call, an Agent SDK run, a CI job and a script. For each one, say which configuration it reads: settings files, CLAUDE.md or AGENTS.md, environment variables, plugins, and the worker's own config file. Mark any run that leaves `settingSources` out, any job that sets a model through an environment variable, and any plugin dependency with no exact version. Change no file.

[^agent-sdk-claude-code-features]: Use Claude Code features in the SDK, Claude Agent SDK, Anthropic.
[^agent-sdk-system-prompts]: Modifying system prompts, Claude Agent SDK, Anthropic.
[^claude-code-model-config]: Model configuration, Claude Code docs, Anthropic.
[^claude-code-settings]: Settings files and precedence, Claude Code docs, Anthropic.
[^plugin-dependencies]: Plugin dependencies, Claude Code docs, Anthropic.
