Cmd. /logout
Sign out of Codex and clear local credentials for the current user.
Key takeaways
/logoutsigns out of Codex and clears the local login session for the current user.- Use it before handing a workstation to another user or during auth troubleshooting before logging in again.
- Re-authenticate from the shell with
codex loginafter logging out. - Confirm no long-running work depends on the current account first, since credential storage can differ by platform and configuration.
Original Command Declaration
/logoutOfficial Summary
/logout signs out of Codex. Use it when rotating accounts or leaving a shared machine.
Usage
/logoutGood Examples
- Run
/logoutbefore handing a workstation to another user. - Use it during auth troubleshooting before logging in again.
Similar Commands
| Command | Difference | Choose It When |
|---|---|---|
/logout | Clears the Codex login session | You need to change or remove credentials |
/status | Shows current session state | You need to confirm auth and policy state |
codex login | Starts login from the shell | You need to authenticate again |
Use Cases
- Shared machine cleanup.
- Account switching.
- Auth reset during support.
Cautions
- Log out only after confirming no long-running work depends on the current account.
- Credential storage can differ by platform and configuration.
Release Basis
- Judgment: first observed mention
- First evidence version:
rust-v0.54.0 - Date (UTC): 2025-11-04
- Release link: https://github.com/openai/codex/releases/tag/rust-v0.54.0
Sources
- Codex slash commands: https://developers.openai.com/codex/cli/slash-commands
- Codex CLI features: https://developers.openai.com/codex/cli/features