[Bug]: Standalone session has no agent until Codex authentication is retried after AO startup on Windows
What went wrong?
On Windows, I already have Codex set up, along with Claude Code and other agents. Right after starting AO, I try to create a standalone session (not a project session). If AO has not recognized my existing Codex login yet, the screen shows no agent and the standalone session fails to start.
I have to go into Settings and retry authentication before it works. I expect AO to recognize the existing Codex login automatically, or wait/retry its check, without requiring me to manually retry authentication at each affected startup.
Agent-collected evidence
Collected 2026-11-17 with read-only CLI checks and source inspection. This is supporting investigation, not a cold-start reproduction or a confirmed root cause.
Build and collection limits
- Installed desktop daemon binary:
resources/daemon/ao.exeunder the Windows AO installation.ao.exe --versionreturned0.15.4-nightly.202611162001, commite230dcd36aab, built2026-11-16T20:03:50Z. - The same binary's
status --jsonreturnedstate: stopped, with the ordinary AO run file and data directory under~/.ao. No fresh live readiness snapshot was available. The daemon was not started, authentication was not retried, and no sessions or user settings were changed. - Clean isolated checkout:
dbd2efc638146aacf6756282ef49af6aa191a956.git ls-remote upstream refs/heads/mainmatched it at collection time. Relevant selection/authentication logic was also compared against installed commite230dcd36aab; the TaskComposer differences since that commit concern attachment upload handling, and the coordinator difference concerns interrupt capability.
Confirmed source behavior
- Standalone default selection requires known-ready authentication. In TaskComposer.tsx, the standalone default comes from
readyFallbackAgent, selected withisReadyAgent. The predicate requires installationinstalledand authenticationauthorizedornot_applicable. Authenticationunknownis excluded. The local new-chat picker additionally filters throughstartsLocally, which also admitsconfiguredcredentials but excludesunknown. - A successful cached read can immediately become a launch-blocking error. TaskComposer requires a nonempty selected agent for submission and returns the no-ready-agent message when the cached query succeeds with no selection.
launch()rejects before reaching its advisoryensureAgentReadiness(..., "launch")call. - The new-chat wait exits on that error. NewChatPage.tsx waits up to 10 seconds for readiness, but stops when
remoteLoadErrorbecomes truthy. Thus a successful pending snapshot can stop the wait before a later background check finishes. - Pending account synchronization is distinct from signed out. codex_account_service.go can return unchecked authentication with diagnostic
account_sync_pendingwhen it has no active account and device/account reconciliation remains unresolved or a device credential is present. This is not evidence that the native CLI lacks a login. Launch-purpose checking can fall back to native readiness when device reconciliation is unverified. Saved-default accounts and custom providers have separate paths. - Automatic checking already exists. The daemon starts
WarmCodexAccountsandWarmReadiness. Device reconciliation has single-flight execution and three automatic attempts for transient failures. The readiness coordinator has additional retry scheduling for classified check failures. Claims that AO never checks automatically would be incorrect. - Renderer recovery needs end-to-end verification. useAgentReadinessQuery.ts retains cached snapshots with infinite stale time. However, the shell-wide HarnessUpdateNotice already ensures display readiness and writes its response to that cache. Settings opening forces another refresh. Therefore infinite stale time alone does not establish the cause. Later daemon-only recovery, account invalidation/rechecking, and renderer notification after a successful-but-pending response remain investigation points.
Duplicate search
Resolved canonical repository via gh api repos/OrchestratorInc/agent-orchestrator --jq .full_name. Searched open and closed issues and PRs using Codex readiness/authentication, standalone agent/readiness, startup authentication, and the no-agent message. Read related reports #4908, #4973, #4989, #5054, #5151, #4341 and PRs #5742, #5797, #6228, #8530. None establishes this exact standalone pre-launch startup symptom. Older closed Codex recovery reports are related context; the primary cause here may differ. #8530 concerns project role defaults; #6228 concerns already-created Chat controller readiness.
Working hypothesis: a pending startup/account snapshot is treated as unavailable by local standalone selection, and automatic recovery may not reach that view reliably. The precise ordering and whether Settings refresh alone suffices, versus an actual new sign-in, remain unverified. Missing CLI installation and archived-session deletion are separate concerns.
I'd like to work on this. Implementing the agreed standalone startup-readiness recovery plan, preserving drafts and remembered Codex selection.
Closing: this no longer reproduces on the affected Windows machine.
Root cause, as far as it can be traced: AO's Codex device sync failed with account_storage_unsafe retryable=false on every start from Nov 14 to Nov 23 (59 log lines). That left display readiness at account_sync_pending ("Login status unavailable") until a manual check, which uses launch readiness and its native login fallback.
On Nov 24 the Codex desktop app recreated ~/.codex. After a Codex re-login and a new Codex sandbox setup on Nov 26, CodexSandboxUsers has read-only access there, which passes AO's check. Since then, Codex shows as ready a few seconds after startup.
The old files are gone, so the exact failing ACE can't be confirmed. The likely cause is an older Codex sandbox ACL that granted Modify (including DELETE) to the sandbox group or an unmapped SID. That is outside what AO allows or auto-repairs. The same pattern still exists on that machine's %TEMP%.
If this shows up again, the fix candidate from #8605 (Windows-only native login fallback for display readiness when sync is blocked) can be revived.
Generated by Claude Code