diff --git a/README.md b/README.md index b2329ec..763c85c 100644 --- a/README.md +++ b/README.md @@ -332,6 +332,13 @@ server, disconnect Desktop before running the restart command. No restart notice is printed when the catalog and managed provider configuration are unchanged or when a newer daemon has already loaded them. +After setup or any required reconnect, start a new Codex task before selecting +a Webster model. Codex persists the model provider with each task, so a task +created before setup remains on the built-in `openai` provider even if its +model is later changed in the picker. Selecting a Webster model in that older +task sends it to the ChatGPT backend and produces a "model is not supported +when using Codex with a ChatGPT account" error. + It is not wired into `install.sh`, because it needs both a Webster secret and an existing Codex login. Run it separately after the bootstrap. diff --git a/codex-setup.sh b/codex-setup.sh index 0cc8882..be38044 100755 --- a/codex-setup.sh +++ b/codex-setup.sh @@ -124,11 +124,15 @@ report_codex_client_reload() { if [ "$state" = managed ] && [ -f "$pid_file" ] && [ "$pid_file" -nt "$RELOAD_MARKER" ]; then [ "$CHECK_ONLY" = 1 ] || rm -f "$RELOAD_MARKER" + printf '\nStart a new Codex task before selecting a Webster model. ' + printf 'Existing tasks keep the model provider they started with.\n' return 0 fi if [ "$state" = stopped ]; then [ "$CHECK_ONLY" = 1 ] || rm -f "$RELOAD_MARKER" printf '\nCodex app-server is not running; the new models will load on its next start.\n' + printf 'Start a new Codex task before selecting a Webster model. ' + printf 'Existing tasks keep the model provider they started with.\n' return 0 fi @@ -151,6 +155,8 @@ report_codex_client_reload() { printf 'Then disconnect and reconnect this machine in Codex Desktop ' printf '(or fully quit and reopen Desktop).\n' fi + printf 'Start a new Codex task before selecting a Webster model. ' + printf 'Existing tasks keep the model provider they started with.\n' } record_failure() { diff --git a/test.sh b/test.sh index e49b657..cc2b6ae 100755 --- a/test.sh +++ b/test.sh @@ -1249,6 +1249,7 @@ if ! ( unmanaged_notice=$(report_codex_client_reload 2>&1) printf '%s' "$unmanaged_notice" | grep -q '1. Disconnect' printf '%s' "$unmanaged_notice" | grep -q '3. Reconnect' + printf '%s' "$unmanaged_notice" | grep -q 'Start a new Codex task' mkdir -p "$CODEX_DIR/app-server-daemon" touch -t 202001010000 "$CODEX_DIR/app-server-daemon/app-server.pid" touch -t 202101010000 "$RELOAD_MARKER" @@ -1256,8 +1257,13 @@ if ! ( reload_notice=$(report_codex_client_reload 2>&1) printf '%s' "$reload_notice" | grep -q 'codex app-server daemon restart' printf '%s' "$reload_notice" | grep -q 'disconnect and reconnect' + printf '%s' "$reload_notice" | grep -q 'Existing tasks keep the model provider' + export TEST_CODEX_DAEMON_STATE=stopped + stopped_notice=$(report_codex_client_reload 2>&1) + printf '%s' "$stopped_notice" | grep -q 'new models will load on its next start' + printf '%s' "$stopped_notice" | grep -q 'Start a new Codex task' ); then - echo "FAIL: Codex stale-daemon detection omitted restart/reconnect guidance" >&2 + echo "FAIL: Codex stale-daemon detection omitted restart/reconnect/new-task guidance" >&2 exit 1 fi