Cmd. /stop
Stop all background terminals owned by the current Codex session.
Key takeaways
/stopstops all background terminals owned by the current session, with/cleanavailable as an alias.- Run
/psfirst to inspect background work, then/stopwhen a watcher or long test is no longer needed. - Use it before leaving a session to prevent unused background work from consuming CPU or filling logs.
- It targets only Codex-owned background terminals and does not guarantee cleanup of unrelated external processes.
Original Command Declaration
/stopOfficial Summary
/stop stops all background terminals for the current session. /clean remains available as an
alias.
Usage
/stopGood Examples
- Run
/psfirst, then/stopwhen a watcher or long test is no longer needed. - Use
/stopbefore leaving a session that started background work.
Similar Commands
| Command | Difference | Choose It When |
|---|---|---|
/stop | Cancels background terminal work | Session-owned commands should stop |
/ps | Lists background terminal work | You need to inspect before stopping |
/exit | Exits the CLI | You are done with the session itself |
Use Cases
- Stopping test watchers.
- Cleaning up long builds.
- Preventing unused background work from consuming CPU or logs.
Cautions
/stoptargets Codex background terminal work. It does not guarantee cleanup of unrelated external processes.- Inspect with
/psbefore stopping when there is any doubt.
Release Basis
- Judgment: official slash command table
- First evidence version: official slash command reference
- Date (UTC): verified 2026-05-17
- Release link: https://developers.openai.com/codex/cli/slash-commands
Sources
- Codex slash commands: https://developers.openai.com/codex/cli/slash-commands
- Codex CLI features: https://developers.openai.com/codex/cli/features