Skip to content

Fix stale Codex auth state in desktop#4460

Merged
KyleAMathews merged 3 commits into
mainfrom
fix/codex-stale-auth
Jun 2, 2026
Merged

Fix stale Codex auth state in desktop#4460
KyleAMathews merged 3 commits into
mainfrom
fix/codex-stale-auth

Conversation

@KyleAMathews
Copy link
Copy Markdown
Contributor

Summary

  • clear stale Codex desktop auth when no usable access token can be produced
  • keep desktop OAuth refresh as the only refresh path for stored credentials
  • avoid showing Codex as enabled when the runtime cannot set ELECTRIC_CODEX_ACCESS_TOKEN

Test

  • pnpm --filter @electric-ax/agents-desktop typecheck

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 1, 2026

Electric Agents Desktop Builds

Build artifacts for commit a533c38.

Platform Status Artifact
macOS Apple Silicon Passed DMG
macOS Intel Passed DMG
Windows x64 Passed Installer
Linux x64 Passed AppImage / deb

Workflow run

@kevin-dp kevin-dp force-pushed the fix/codex-stale-auth branch from a02884b to cc5745b Compare June 2, 2026 13:23
}

async function clearCodexAuth(
deps: Pick<
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This Picked type is the most precise but also verbose and requires more maintenance (any time one of these props changes). I would keep it simple here: deps: CodexAuthDeps


export async function syncCodexEnvironment(
deps: Pick<CodexAuthDeps, `settings` | `getSecretStore`>
deps: Pick<
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as before, simplify to: deps: CodexAuthDeps

@KyleAMathews KyleAMathews merged commit 831c623 into main Jun 2, 2026
13 checks passed
@KyleAMathews KyleAMathews deleted the fix/codex-stale-auth branch June 2, 2026 16:01
@KyleAMathews KyleAMathews restored the fix/codex-stale-auth branch June 2, 2026 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants