Inspiration

What it does

How we built it## Inspiration

Developers may legitimately use separate Codex profiles for personal work, client work, education, or different organizations. Switching between them is disruptive: it often requires repeated sign-ins, manually moving authentication files, or maintaining separate Windows environments. These workarounds are error-prone and make it difficult to understand which profile is approaching its weekly usage limit.

Codex Shift turns this workflow into a deliberate, visible, and reversible desktop operation while keeping the developer's local Codex workspace intact.

What it does

Codex Shift is an open-source Windows 10/11 control center for authorized Codex profiles. It can:

  • create locally named profiles through the installed Codex browser OAuth flow;
  • encrypt inactive authentication documents with Windows DPAPI;
  • switch authorized profiles without fragmenting the local Codex workspace;
  • display account identity and weekly usage information through the official locally installed Codex app-server;
  • refresh profiles inside isolated temporary CODEX_HOME directories;
  • search, sort, and highlight profiles that need attention;
  • switch between English and Chinese instantly without restarting;
  • provide optional background refresh, startup, tray, and low-quota notification settings.

Codex Shift never merges entitlements, bypasses quotas, consumes reset credits, or operates multiple Codex accounts concurrently.

How we built it

The application is a self-contained .NET 8 Windows Forms utility divided into a desktop UI and a testable core library.

The core implements atomic file replacement, Windows DPAPI protection, profile storage, quota models, temporary-home isolation, cleanup, and official app-server protocol mapping. The UI provides OAuth onboarding, explicit switching confirmation, profile search and sorting, quota visualization, bilingual localization, DPI-aware layouts, notifications, and Windows 11 styling.

Codex with GPT-5.6 Sol was used as the development agent throughout the project. It helped us:

  • inspect and map the official Codex app-server protocol;
  • turn security requirements into implementation boundaries;
  • implement small, reviewable changes;
  • generate tests for failure and cleanup paths;
  • review credential handling;
  • diagnose DPI and localization issues;
  • refine the Windows interface;
  • create release and installer workflows;
  • prepare documentation and judging materials.

Human decisions remained explicit around product scope, privacy, security boundaries, interface design, and the actions the tool must never perform.

Challenges

The hardest challenge was making background profile inspection safe. Refreshing usage information must not silently replace the active account, expose credentials in logs, accept a refreshed token belonging to another account, or leave authentication material in temporary directories.

Another challenge was treating app-server responses as variable data. Different profiles may return unavailable weekly windows or partial reset-credit information. Codex Shift represents these states honestly instead of inventing values.

The interface also needed to remain usable across different Windows DPI settings and languages. English and Chinese text have different layout requirements, so language switching and responsive sizing were implemented without requiring an application restart.

Accomplishments

  • Delivered a complete Windows product instead of only a protocol proof of concept.
  • Implemented encrypted local profile storage and isolated quota refresh.
  • Added instant English and Chinese switching.
  • Added a self-contained installer and portable release.
  • Created security, privacy, installation, and testing documentation.
  • Reached 343 passing automated tests.
  • Preserved a narrow compatibility boundary by using the locally installed official Codex app-server without redistributing OpenAI binaries.

What we learned

Agent-assisted development works best when product decisions become testable boundaries. “Never replace the active account while monitoring” became isolated temporary homes and focused tests. “Never accept credentials for another account” became an exact account-ID validation gate. “Never claim unavailable quota data” became explicit unavailable states.

GPT-5.6 Sol accelerated implementation and review, while the durable result came from turning those decisions into code, tests, and clear user-facing explanations.

What's next

  • Add signed Windows releases when a sustainable signing path is available.
  • Add exportable, privacy-safe diagnostic reports.
  • Continue compatibility testing as the official Codex app-server evolves.
  • Expand keyboard navigation and high-contrast verification.

Challenges we ran into

Accomplishments that we're proud of

What we learned

What's next for Codex Shift

Built With

Share this project:

Updates