Child 2 of 6 — parent #740. No deploy. Local dev-loop only.
Self-contained and independently mergeable. Prerequisite for child 4 (default flip) to actually take effect locally.
Problem
agent/run.sh:208 always passes the variable into the container with its own fallback:
-e "ANTHROPIC_MODEL=${ANTHROPIC_MODEL:-us.anthropic.claude-sonnet-4-6}"
Because the variable is always set in the container env, os.environ.get("ANTHROPIC_MODEL", ...) at agent/src/config.py:563 never reaches its fallback. So run.sh silently overrides the platform default rather than deferring to it: local Docker runs are on Sonnet 4.6 while deployed runs are on Opus 4.8. Any future default bump would leave local runs behind.
The ${VAR:-default} idiom is right for genuinely optional shell inputs, but wrong here — config.py already owns the default, and this shadows it.
Fix
Pass the variable through only when the caller actually set it, matching how the surrounding optional vars are already handled at agent/run.sh:215-216:
[[ -n "${ANTHROPIC_MODEL}" ]] && DOCKER_ARGS+=(-e "ANTHROPIC_MODEL=${ANTHROPIC_MODEL}")
Also update the usage text at agent/run.sh:33, which advertises the same stale Sonnet-4.6 default. Prefer describing it as "defaults to the agent runtime default" over restating a literal — restating is what let it drift.
Verification
# unset -> agent's own default (currently us.anthropic.claude-opus-4-8)
./agent/run.sh --dry-run "owner/repo" 1
# set -> caller's value wins
ANTHROPIC_MODEL=us.anthropic.claude-opus-5 ./agent/run.sh --dry-run "owner/repo" 1
DRY_RUN=1 prints the resolved config without invoking the agent, so this is verifiable without Bedrock spend.
Acceptance criteria
Notes
Local-only script change; no CDK, no deployed surface, no IAM. Sibling of #742.
Child 2 of 6 — parent #740. No deploy. Local dev-loop only.
Self-contained and independently mergeable. Prerequisite for child 4 (default flip) to actually take effect locally.
Problem
agent/run.sh:208always passes the variable into the container with its own fallback:-e "ANTHROPIC_MODEL=${ANTHROPIC_MODEL:-us.anthropic.claude-sonnet-4-6}"Because the variable is always set in the container env,
os.environ.get("ANTHROPIC_MODEL", ...)atagent/src/config.py:563never reaches its fallback. Sorun.shsilently overrides the platform default rather than deferring to it: local Docker runs are on Sonnet 4.6 while deployed runs are on Opus 4.8. Any future default bump would leave local runs behind.The
${VAR:-default}idiom is right for genuinely optional shell inputs, but wrong here —config.pyalready owns the default, and this shadows it.Fix
Pass the variable through only when the caller actually set it, matching how the surrounding optional vars are already handled at
agent/run.sh:215-216:Also update the usage text at
agent/run.sh:33, which advertises the same stale Sonnet-4.6 default. Prefer describing it as "defaults to the agent runtime default" over restating a literal — restating is what let it drift.Verification
DRY_RUN=1prints the resolved config without invoking the agent, so this is verifiable without Bedrock spend.Acceptance criteria
run.shpassesANTHROPIC_MODELonly when non-empty; no hardcoded model literal remains in the scriptconfig.pydefault; set → caller's valuegrep -n 'claude-sonnet-4-6' agent/run.shreturns nothingmise run buildgreenNotes
Local-only script change; no CDK, no deployed surface, no IAM. Sibling of #742.