From 25fd7407fdcbdc290ba2a9cfb41d13f15a39154c Mon Sep 17 00:00:00 2001 From: autonomic-bot Date: Sun, 31 May 2026 13:24:53 +0000 Subject: [PATCH] launch-upgrader: default model to sonnet (UPGRADER_MODEL) Adds UPGRADER_MODEL env var (default: sonnet) passed as --model to the claude invocation. The cron runs the upgrader on Sonnet so it doesn't consume Opus weekly credits. Override with UPGRADER_MODEL=opus if needed. Co-Authored-By: Claude Sonnet 4.6 --- cc-ci-plan/launch-upgrader.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cc-ci-plan/launch-upgrader.sh b/cc-ci-plan/launch-upgrader.sh index fbe5f40..b9e2f9c 100755 --- a/cc-ci-plan/launch-upgrader.sh +++ b/cc-ci-plan/launch-upgrader.sh @@ -29,6 +29,7 @@ SESSION="${UPGRADER_SESSION:-cc-ci-upgrader}" # tmux session name == remo WORKDIR="${UPGRADER_DIR:-/srv/cc-ci}" # cwd: where .claude/skills/ + .testenv live CLAUDE_BIN="${CLAUDE_BIN:-claude}" CLAUDE_FLAGS="${CLAUDE_FLAGS:---dangerously-skip-permissions}" +UPGRADER_MODEL="${UPGRADER_MODEL:-sonnet}" # model for the upgrader agent (sonnet = default) REMOTE_CONTROL="${REMOTE_CONTROL:-1}" # 1 => --remote-control (viewable at claude.ai/code) LOG_DIR="${LOG_DIR:-/srv/cc-ci/.cc-ci-logs}" UPGRADER_ARGS="${UPGRADER_ARGS:-}" @@ -90,9 +91,9 @@ start() { local kf rc="" kf="$(write_kickoff)" [[ "$REMOTE_CONTROL" == "1" ]] && rc="--remote-control '$SESSION'" - log "starting $SESSION (cwd=$WORKDIR, rc=$REMOTE_CONTROL, args='${UPGRADER_ARGS:-}')" + log "starting $SESSION (cwd=$WORKDIR, rc=$REMOTE_CONTROL, model=$UPGRADER_MODEL, args='${UPGRADER_ARGS:-}')" tmux new-session -d -s "$SESSION" -c "$WORKDIR" \ - "$CLAUDE_BIN $rc $CLAUDE_FLAGS \"\$(cat '$kf')\"" + "$CLAUDE_BIN $rc --model '$UPGRADER_MODEL' $CLAUDE_FLAGS \"\$(cat '$kf')\"" tmux pipe-pane -o -t "$SESSION" "cat >> '$LOG_DIR/$SESSION.log'" log "started. status: $0 status | attach: tmux attach -t $SESSION | log: $LOG_DIR/$SESSION.log" } @@ -117,7 +118,7 @@ cc-ci upgrader launcher — one-shot weekly recipe-upgrade job agent (remote-con $0 attach tmux attach to the session $0 stop kill the session -Env: SESSION=$SESSION WORKDIR=$WORKDIR REMOTE_CONTROL=$REMOTE_CONTROL UPGRADER_ARGS='${UPGRADER_ARGS:-}' +Env: SESSION=$SESSION WORKDIR=$WORKDIR REMOTE_CONTROL=$REMOTE_CONTROL UPGRADER_MODEL=$UPGRADER_MODEL UPGRADER_ARGS='${UPGRADER_ARGS:-}' The agent runs /upgrade-all (DEFAULT mode) to completion, then STOPS and stays idle (viewable in the web UI). It does NOT self-terminate; the next weekly `start` clears the idle session and runs fresh. EOF