Use when managing or debugging saved Codex login profiles on Ubuntu with the local `codexbar` CLI. Covers profile capture and switching, `active_profile` vs current root auth mismatches, duplicate saved identities, current-root usage, saved per-profile usage snapshots, and `usage`, `usage --all`, `whoami`, `doctor`, and `validate` workflows under `~/.codex` and `~/.codexbar`.
Use this skill when the user wants to work with saved Codex login profiles on
Ubuntu rather than treating ~/.codex/auth.json as the only state.
This skill assumes the local codexbar CLI from this repository is available,
or can be installed first from the repository root.
Check the current login state first:
codexbar whoami
codexbar doctor
Inspect local usage state:
codexbar usage
codexbar usage --all
Legacy compatibility flags are still accepted, but they do not trigger live saved-profile probing in the current CLI:
codexbar usage --all --refresh
Capture the current auth into a saved profile:
codexbar capture main --overwrite
codexbar --help.whoami and doctor before telling the user which account is really active.list, create, capture, activate, and switch to manage saved profiles.usage for the current-root local session view.usage --all for saved per-profile session snapshots plus current-root context.usage --all --refresh and --timeout as deprecated compatibility flags, not live probing controls.validate before switching if a saved profile looks incomplete or inconsistent.active_profile as state, not guaranteed live identity.--refresh probes canonical saved profiles in the current CLI.~/.codex/sessions; do not invent per-profile session silos unless the user explicitly wants a different design.Read references/cli-workflow.md for command
selection and references/state-model.md for how
active_profile, current root auth, canonical profiles, and cached usage fit
together.