Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
6 changes: 6 additions & 0 deletions codex-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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() {
Expand Down
8 changes: 7 additions & 1 deletion test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1249,15 +1249,21 @@ 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"
export TEST_CODEX_DAEMON_STATE=managed
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

Expand Down
Loading