You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Desktop chat: cold-start initializeAcp() still awaits OAuth in-band (same stall as .113, at bridge init) #10407
The .113 chat-freeze fix (ACP -32000 under piMono → terminalize-first) severed the in-band OAuth await on the active-turn recovery paths (onRecoverableError / recoverAfterError now signal Swift and return false). But the cold-start bridge-init path still awaits OAuth in-band, so the same 60s-silence → 2-minute-OAuth-timeout stall survives when ACP requires auth at initialization instead of mid-turn.
Evidence
desktop/macos/agent/src/index.ts:1029-1052 — initializeAcp() catches AcpError code -32000 and does:
logErr(`ACP requires authentication: ${JSON.stringify(authMethods)}`);awaitstartAuthFlow();// blocks up to 2 min; Swift startClaudeAuth() is a silent no-op under piMonoawaitinitializeAcp();// retry after auth
startAuthFlow() (index.ts:951) awaits the OAuth callback (2-minute timeout). Under piMono preference, Swift's startClaudeAuth() is gated on isUserClaudeMode and never opens the browser, so the callback never arrives — identical to the incident, just triggered at bridge init (first send after launch, or the restart path at index.ts:1550) rather than on an admitted turn. The active-turn fix does not cover this call site; it was consciously deferred in the incident synthesis (Cold-start initializeAcp() OAuth policy, .coordination/chat-freeze-113/committee-synthesis.md §7 "Do not do in this PR").
Suggested scope (one self-contained PR)
Apply the same terminalize-first contract to init: on -32000 during initializeAcp(), signal auth_required to Swift and surface a terminal provider-auth state instead of await startAuthFlow(). The first user send then fails fast with failureCode: authentication rather than hanging. Falsifiable test (mirrors the existing acp-auth-terminal.test.ts T1): cold-start ACP init injects -32000 with no OAuth callback → init returns without blocking (<1s), no startAuthFlow await, subsequent send terminalizes as authentication.
Activity
fix(desktop): stop cold-start ACP init from awaiting Claude OAuth in-…