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
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<Version>1.45.10</Version>
<Version>1.45.11</Version>
</PropertyGroup>
<PropertyGroup Condition="'$(SelfContained)' == 'true'">
<RuntimeFrameworkVersion>10.0.15</RuntimeFrameworkVersion>
Expand Down
4 changes: 4 additions & 0 deletions docs/RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Binary releases

## 1.45.11

Account cards show **Sign in** and a dash when an account's login is rejected. Windows preserves file access permissions when saving Switch-owned account data, retires obsolete empty restart records, and remembers the order of account tanks. The dashboard also uses consistent Focus buttons, dismissible notices with countdown bars, and hardware meters without internal tick marks. [Changes and verification](development/RELEASE_1_45_11.md)

## 1.45.10

Windows account cards can open a dedicated Codex window for each additional account and focus it again while other accounts keep running. Each window has its own login, native home and chat history. Switch verifies its live user and workspace before bringing it forward. The dashboard receives active chat counts and discards an observation when the login changes or the connection closes. Separate account windows are available in manual mode with credit use allowed.
Expand Down
8 changes: 7 additions & 1 deletion docs/development/ACCOUNT_AUTOMATION.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Account reauthentication and automatic switching

The per-account warning action opens the existing official browser login flow for that account. Hover retains the full refresh error. A different account identity is rejected before registration is changed. Successful reauthentication updates the original registration, retaining its key, alias and usage history. Canonical desktop credentials are applied only through the existing switch action.
The per-account warning action opens the existing official browser login flow for that account. A confirmed login rejection changes the account action to **Sign in** and replaces current quota figures with dashes. The encrypted vault retains usage history and remembers the rejection across restarts. Ordinary refresh failures retain the last usage reading and show the refresh error on hover. A different account identity is rejected before registration is changed. Successful reauthentication updates the original registration, retaining its key, alias and usage history. Canonical desktop credentials are applied only through the existing switch action.

The **Auto Switch** toolbar menu contains a persistent On/Off toggle and the next eligible account, with automation disabled by default. Select a remaining-usage threshold of 5, 10 (default), 15 or 20 percent. The evaluator runs after the regular 60-second refresh. It requires one current account, successful observations no older than two minutes, matching bucket/window identities and positive durations, and a candidate with every reported window at least five percentage points above the threshold. Missing/zero/negative durations do not qualify even when both accounts omit the same value. Duplicate or blank quota bucket IDs make a profile ambiguous: a source blocks automatic selection/forecasting and a candidate is skipped while valid alternatives remain eligible. Original quota snapshots remain unchanged; ambiguity is not merged, guessed or accepted through a dictionary exception. A source at exactly the threshold does not trigger. An exhausted source can switch away; restricted candidates cannot be selected. Displaying a different quota in a card does not change this policy. Stale, failed, refreshing, missing or invalid quota data never initiates a handoff. A stopped/disconnected desktop, active login/switch/query, five-minute persisted cooldown or pending recovery also blocks automatic selection.

Expand All @@ -10,6 +10,10 @@ On Windows, manual account cards offer **Open** or **Focus**. Each additional ac

Automatic switching and credit protection manage the primary session. Separate account windows use manual mode with credit use allowed. Existing recovery and login application actions remain explicit. Removing a registration for a closed managed window removes its file login and retains its local chat history.

The Windows dashboard saves tank positions by account key in the encrypted vault. Drag the handle at the start of a tank header or use **Move card** in the account menu. The dashboard keeps the chosen order across restarts and adds new accounts at the end. Automatic switching keeps its own priority list.

Windows status notices display a remaining-time bar and a close button. Ordinary notices expire after eight seconds and warnings expire after fifteen. Dismissing a recovery notice leaves the recovery action on the account card.

Coordinated account handoff saves checkpoints for chat backup, normal shutdown, credential application, native launch, IPC discovery and chat resume. The switch saves a checkpoint before shutdown or credential application. Transient failures share up to **two additional retries**, saved before each one-second retry wait. An unconfirmed shutdown or launch that reaches its deadline stops for explicit recovery. Once the native desktop is observed running, IPC and chat retries stay in their own stages. A switch with no chats left to resume completes upon observing the desktop. Each retry checks account identity where it authorizes an action. The coordinator recognizes credentials already applied and only observes a Continue whose delivery is uncertain.

Windows shows the current step, remaining stage time, chat count, retry number and a cancel action in the account header. The budgets are 45 seconds for preparation or normal shutdown, 60 seconds per name backup or account application, 40 seconds for launch, 30 seconds per connection attempt and 90 seconds per chat resume. Model-profile operations have a separate 180-second budget. Cancellation waits for the current operation to settle. After confirmed shutdown and before any launch request, cancellation or a failed application can trigger one 35-second safety attempt to reopen the verified desktop. A failed automatic handoff disables further automation.
Expand All @@ -18,6 +22,8 @@ Windows shows the current step, remaining stage time, chat count, retry number a

During a same-account restart, Switch reopens each captured chat and confirms that the native client loaded it. Codex controls automatic continuation. Active goals also retain native continuation ownership during account handoff, including while goal metadata is being restored.

On Windows, a verified primary Codex window that started after an empty manual same-account restart request resolves that pending request. Switch checks the current login and preserves any request that recorded chats, applied credentials or model settings, or involved credit protection.

The observed Windows desktop 26.1117.4957.0 used private stdio for its app-server. Switching a saved login in the open window requires both a connection to that server and an operation that can adopt the target login. In a disposable two-login test, a second app-server read login B after the credentials file changed. The original server still reported A through `accountSession/list`. Calling `accountSession/switch` on the original server with B's actual session and workspace IDs returned JSON-RPC error `-32600` on both 0.167.0-alpha.4.1 and 0.171.0-alpha.13. On 0.167.0-alpha.4.1, account and auth refresh requests also left A active. Verify a change of identity on the server serving the desktop before reporting completion.

After the utility restarts, an interrupted automatic plan with no retry reserved gets one persisted recovery attempt, counted within the same two-retry budget. A plan that has already reserved a retry requires manual Recover after a utility restart. Explicit user/lifetime cancellation prevents automatic recovery and retains manual Recover. No indefinite timer/restart loop is allowed. Already completed chats and original Continue message identities survive recovery; ambiguous delivery retains the existing no-resend policy. Disabling automation affects future selection, not a checkpointed handoff already in progress. Recovery cannot guarantee launch when the client is missing or its IPC remains unavailable; the pending plan and error remain available for a later retry.
Expand Down
21 changes: 21 additions & 0 deletions docs/development/RELEASE_1_45_11.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Release 1.45.11

## Account access and recovery

- Show **Sign in** for a rejected login and open browser reauthentication for the selected account. Replace stale current quota with a dash while preserving usage history. Brief refresh failures retain the last reading.
- Save Switch-owned Windows account files with an atomic rename and preserve destination access permissions. Reopening a prepared account window skips unchanged settings and unnecessary vault writes.
- Clear an empty manual restart record after verifying that the primary Windows Codex window started later under the same login. Plans with saved chats or credential changes remain recoverable.

## Windows dashboard

- Give every **Focus** button the same style. Drag a tank by its handle or choose **Move card** in its menu. The vault remembers the layout independently of automatic switching priority.
- Show the remaining time at the bottom of each notice. Ordinary notices expire after eight seconds, warnings after fifteen. The close button dismisses the notice immediately. A dismissed recovery notice leaves its action on the account card.
- Remove the internal vertical ticks from the CPU, memory, GPU and VRAM meters.

## Verification scope

The Windows desktop checks cover rejected logins, hidden stale quota, preserved recovery records, account-window file replacement under Windows access controls, saved dashboard order and notice dismissal. Local Windows pixel comparisons use identical fictional hardware readings for both themes and languages. The screenshots are renders of production controls with fictional data.

[Tank order and matching Focus buttons](../media/release-1.45.11/dashboard-reordered-ko.png) · [Notification timer and close button](../media/release-1.45.11/notification-countdown-ko.png) · [Earlier hardware meters](../media/release-1.45.11/hardware-before.png) · [Hardware meters with ticks removed](../media/release-1.45.11/hardware-after.png)

Windows x64 and both macOS architectures have self-contained downloads. Both Linux architectures use the existing preview package scope.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/media/release-1.45.11/hardware-after.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/media/release-1.45.11/hardware-before.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions localization/packs/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,11 @@
"subscription.left": "Resttage",
"subscription.expired_days": "Seit {0}T abgelaufen",
"account.relogin": "Im Browser erneut anmelden",
"account.sign_in": "Anmelden",
"dashboard.drag_account": "Kontokarten durch Ziehen sortieren",
"dashboard.move_account": "Karte verschieben",
"dashboard.position": "{0}. {1}",
"account.login_required": "Melden Sie sich erneut an, um die Nutzung zu aktualisieren.",
"account.relogin_mismatch": "Mit dem gewählten Konto anmelden. Bestehende Konten wurden beibehalten.",
"auto.on": "Auto-Kontowechsel: Ein",
"auto.off": "Auto-Kontowechsel: Aus",
Expand Down
5 changes: 5 additions & 0 deletions localization/packs/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,11 @@
"subscription.left": "Days left",
"subscription.expired_days": "Expired {0}d ago",
"account.relogin": "Sign in again in browser",
"account.sign_in": "Sign in",
"dashboard.drag_account": "Drag to reorder account cards",
"dashboard.move_account": "Move card",
"dashboard.position": "{0}. {1}",
"account.login_required": "Sign in again to update usage.",
"account.relogin_mismatch": "Sign in with the selected account. Existing accounts were preserved.",
"auto.on": "Account auto-switch: On",
"auto.off": "Account auto-switch: Off",
Expand Down
5 changes: 5 additions & 0 deletions localization/packs/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,11 @@
"subscription.left": "Días restantes",
"subscription.expired_days": "Venció hace {0}d",
"account.relogin": "Iniciar sesión de nuevo",
"account.sign_in": "Iniciar sesión",
"dashboard.drag_account": "Arrastra para reordenar las tarjetas de cuenta",
"dashboard.move_account": "Mover tarjeta",
"dashboard.position": "{0}. {1}",
"account.login_required": "Vuelve a iniciar sesión para actualizar el uso.",
"account.relogin_mismatch": "Inicia sesión con la cuenta seleccionada. Se conservaron las cuentas existentes.",
"auto.on": "Cambio de cuenta auto.: Sí",
"auto.off": "Cambio de cuenta auto.: No",
Expand Down
5 changes: 5 additions & 0 deletions localization/packs/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,11 @@
"subscription.left": "Jours restants",
"subscription.expired_days": "Expiré depuis {0}j",
"account.relogin": "Se reconnecter dans le navigateur",
"account.sign_in": "Se connecter",
"dashboard.drag_account": "Faites glisser pour réorganiser les cartes",
"dashboard.move_account": "Déplacer la carte",
"dashboard.position": "{0}. {1}",
"account.login_required": "Reconnectez-vous pour actualiser l’utilisation.",
"account.relogin_mismatch": "Connectez-vous au compte sélectionné. Les comptes existants ont été conservés.",
"auto.on": "Bascule auto de compte : activée",
"auto.off": "Bascule auto de compte : désactivée",
Expand Down
5 changes: 5 additions & 0 deletions localization/packs/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,11 @@
"subscription.left": "残り日数",
"subscription.expired_days": "{0}日前に期限切れ",
"account.relogin": "ブラウザーで再ログイン",
"account.sign_in": "ログイン",
"dashboard.drag_account": "ドラッグしてアカウントカードを並べ替える",
"dashboard.move_account": "カードを移動",
"dashboard.position": "{0}. {1}",
"account.login_required": "使用量を更新するには再度ログインしてください。",
"account.relogin_mismatch": "選択したアカウントでログインしてください。既存の登録は保持されました。",
"auto.on": "アカウント自動切替: オン",
"auto.off": "アカウント自動切替: オフ",
Expand Down
5 changes: 5 additions & 0 deletions localization/packs/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,11 @@
"subscription.left": "남은 일수",
"subscription.expired_days": "{0}일 지남",
"account.relogin": "브라우저에서 다시 로그인",
"account.sign_in": "로그인",
"dashboard.drag_account": "드래그해서 계정 카드 순서 바꾸기",
"dashboard.move_account": "카드 위치 이동",
"dashboard.position": "{0}. {1}",
"account.login_required": "사용량을 확인하려면 다시 로그인하세요.",
"account.relogin_mismatch": "선택한 계정으로 로그인해 주세요. 기존 계정 정보는 보존했습니다.",
"auto.on": "계정 자동 전환: 켜짐",
"auto.off": "계정 자동 전환: 꺼짐",
Expand Down
5 changes: 5 additions & 0 deletions localization/packs/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,11 @@
"subscription.left": "Dias restantes",
"subscription.expired_days": "Expirou há {0}d",
"account.relogin": "Entrar novamente no navegador",
"account.sign_in": "Entrar",
"dashboard.drag_account": "Arraste para reordenar os cartões de conta",
"dashboard.move_account": "Mover cartão",
"dashboard.position": "{0}. {1}",
"account.login_required": "Entre novamente para atualizar o uso.",
"account.relogin_mismatch": "Entre com a conta selecionada. As contas existentes foram preservadas.",
"auto.on": "Troca auto. de conta: Ligada",
"auto.off": "Troca auto. de conta: Desligada",
Expand Down
5 changes: 5 additions & 0 deletions localization/packs/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,11 @@
"subscription.left": "剩余天数",
"subscription.expired_days": "已过期{0}天",
"account.relogin": "在浏览器中重新登录",
"account.sign_in": "登录",
"dashboard.drag_account": "拖动以调整账户卡片顺序",
"dashboard.move_account": "移动卡片",
"dashboard.position": "{0}. {1}",
"account.login_required": "请重新登录以更新用量。",
"account.relogin_mismatch": "请使用所选账号登录。现有账号信息已保留。",
"auto.on": "账号自动切换:开启",
"auto.off": "账号自动切换:关闭",
Expand Down
5 changes: 5 additions & 0 deletions localization/packs/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,11 @@
"subscription.left": "剩餘天數",
"subscription.expired_days": "已過期{0}天",
"account.relogin": "在瀏覽器中重新登入",
"account.sign_in": "登入",
"dashboard.drag_account": "拖曳以調整帳戶卡片順序",
"dashboard.move_account": "移動卡片",
"dashboard.position": "{0}. {1}",
"account.login_required": "請重新登入以更新使用量。",
"account.relogin_mismatch": "請使用所選帳號登入。現有帳號資訊已保留。",
"auto.on": "帳號自動切換:開啟",
"auto.off": "帳號自動切換:關閉",
Expand Down
15 changes: 15 additions & 0 deletions src/application/AccountLoginRequiredException.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using System;
using System.Text.RegularExpressions;

namespace CodexAccountDesk;

internal sealed class AccountLoginRequiredException() : InvalidOperationException("account.login_required")
{
private static readonly Regex RejectedCredential = new(
@"\b(?:HTTP(?: status)?\s+401|status(?: code)?\s*[:=]?\s*401|401\s+Unauthorized|invalid_grant|refresh_token_(?:expired|reused|invalidated|revoked)|token_revoked|token_expired|please log out and sign in again|not logged in|chatgpt (?:login|authentication) (?:is )?required)\b",
RegexOptions.IgnoreCase | RegexOptions.CultureInvariant);

internal static bool Matches(Exception error) => error is AccountLoginRequiredException ||
error is CodexRequestException { Operation: "account/read" or "account/rateLimits/read" } request &&
(request.Code == 401 || RejectedCredential.IsMatch(request.Message));
}
Loading
Loading