Files
claudecodeui/src
Haileyesus e57ce4248e fix(session-runtime): make Gemini auth handling and Codex resume state deterministic
Why:
- Gemini exit-code 41 auth guidance was defined in two places with slightly different wording, which creates drift and inconsistent UX when auth fails.
- Gemini env bootstrap only short-circuited when *all* auth-related vars were present; that forced unnecessary user-level env file reads even when a valid primary credential already existed.
- Codex session registration only populated the active-session map when an id was unseen; resumed sessions could retain stale thread/abort/status objects, leading to incorrect lifecycle behavior.
- Debug console logs in runtime request paths added noise without operational value.

What changed:
- Removed exit-code 41 from mapGeminiExitCodeToMessage and kept a single authoritative 41 message in the close-handler auth branch.
- Aligned 41 remediation phrasing to consistently reference a valid GEMINI_API_KEY.
- Updated uildGeminiProcessEnv to return early when any primary auth signal is already present (GEMINI_API_KEY, GOOGLE_API_KEY, or GOOGLE_APPLICATION_CREDENTIALS).
- Changed Codex 
egisterSession to always overwrite session state for valid ids so resumed runs replace stale entries.
- Removed unnecessary console.log debug statements in touched runtime paths, including the chat submit debug log.

Impact:
- More predictable Gemini authentication error messaging.
- Avoids needless env-file fallback when credentials are already available.
- Prevents stale Codex session controllers/status from leaking across resumes.
- Cleaner logs with no behavior change to error/warn reporting.
2026-05-08 15:52:25 +03:00
..
2026-05-05 17:36:14 +03:00
2026-04-30 14:09:51 +00:00