Cmd. /logout
Sign out of Codex and clear local credentials for the current user.
Key takeaways
- Sign out of Codex and clear local credentials for the current user.
- Check the input surface and availability before using the examples below.
Purpose
Sign out of Codex and clear local credentials for the current user.
/logoutAvailability
| Field | Value |
|---|---|
| Input surface | Running CLI prompt |
| Kind | Built-in |
| Status | Current reference |
| Aliases | — |
| Documented minimum | Not specified |
| Reviewed against | 2026-09-22 · Codex CLI 0.155.1 |
The installed command menu and account or organization settings determine availability.
Examples
/logoutWhen to use it
- Run
/logoutbefore handing a workstation to another user. - Use it during auth troubleshooting before logging in again.
Choosing related 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 |
Effects and persistence
Signs out of the current account; later authenticated operations require sign-in again.
/logout signs out of Codex. Use it when rotating accounts or leaving a shared machine.
Cautions
- Log out only after confirming no long-running work depends on the current account.
- Credential storage can differ by platform and configuration.
Official sources
Complete command list · Verification scope · History for this command