1# Codex app commands1# Commands
2 2
3Use these commands and keyboard shortcuts to navigate the Codex app.3Use these commands and keyboard shortcuts to navigate the app.
4 4
5## Keyboard shortcuts5## Keyboard shortcuts
6 6
7| | Action | macOS shortcut |7| | Action | Shortcut |
8| ----------- | ------------------ | --------------------------------------------------------------------------------- |8| ----------- | ------------------- | ----------------------------------------------------------------------------------------------------------------- |
9| **General** | | |9| **General** | | |
10| | Command menu | <kbd>Cmd</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> or <kbd>Cmd</kbd> + <kbd>K</kbd> |10| | Command menu | <kbd>Cmd</kbd>/<kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> or <kbd>Cmd</kbd>/<kbd>Ctrl</kbd> + <kbd>K</kbd> |
11| | Settings | <kbd>Cmd</kbd> + <kbd>,</kbd> |11| | Settings | <kbd>Cmd</kbd>/<kbd>Ctrl</kbd> + <kbd>,</kbd> |
12| | Keyboard shortcuts | <kbd>Cmd</kbd> + <kbd>/</kbd> |12| | Keyboard shortcuts | <kbd>Cmd</kbd>/<kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>/</kbd> |
13| | Open folder | <kbd>Cmd</kbd> + <kbd>O</kbd> |13| | Open folder | <kbd>Cmd</kbd>/<kbd>Ctrl</kbd> + <kbd>O</kbd> |
14| | Navigate back | <kbd>Cmd</kbd> + <kbd>[</kbd> |14| | Navigate back | <kbd>Cmd</kbd>/<kbd>Ctrl</kbd> + <kbd>[</kbd> |
15| | Navigate forward | <kbd>Cmd</kbd> + <kbd>]</kbd> |15| | Navigate forward | <kbd>Cmd</kbd>/<kbd>Ctrl</kbd> + <kbd>]</kbd> |
16| | Increase font size | <kbd>Cmd</kbd> + <kbd>+</kbd> or <kbd>Cmd</kbd> + <kbd>=</kbd> |16| | Increase font size | <kbd>Cmd</kbd>/<kbd>Ctrl</kbd> + <kbd>+</kbd> |
17| | Decrease font size | <kbd>Cmd</kbd> + <kbd>-</kbd> or <kbd>Cmd</kbd> + <kbd>\_</kbd> |17| | Decrease font size | <kbd>Cmd</kbd>/<kbd>Ctrl</kbd> + <kbd>-</kbd> |
18| | Toggle sidebar | <kbd>Cmd</kbd> + <kbd>B</kbd> |18| | Toggle sidebar | <kbd>Cmd</kbd>/<kbd>Ctrl</kbd> + <kbd>B</kbd> |
19| | Toggle diff panel | <kbd>Cmd</kbd> + <kbd>Option</kbd> + <kbd>B</kbd> |19| | Open review tab | <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>G</kbd> |
20| | Toggle terminal | <kbd>Cmd</kbd> + <kbd>J</kbd> |20| | Toggle review panel | <kbd>Cmd</kbd>/<kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>B</kbd> |
21| | Toggle bottom panel | <kbd>Cmd</kbd>/<kbd>Ctrl</kbd> + <kbd>J</kbd> |
22| | Toggle terminal | <kbd>Ctrl</kbd> + <kbd>`</kbd> |
21| | Clear the terminal | <kbd>Ctrl</kbd> + <kbd>L</kbd> |23| | Clear the terminal | <kbd>Ctrl</kbd> + <kbd>L</kbd> |
22| **Thread** | | |24| **Chat** | Quick Chat | <kbd>Cmd</kbd>/<kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>N</kbd> |
23| | New thread | <kbd>Cmd</kbd> + <kbd>N</kbd> or <kbd>Cmd</kbd> + <kbd>Shift</kbd> + <kbd>O</kbd> |25| **Task** | New task | <kbd>Cmd</kbd>/<kbd>Ctrl</kbd> + <kbd>N</kbd> or <kbd>Cmd</kbd>/<kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>O</kbd> |
24| | Search threads | <kbd>Cmd</kbd> + <kbd>G</kbd> |26| | Search tasks | <kbd>Cmd</kbd>/<kbd>Ctrl</kbd> + <kbd>G</kbd> |
25| | Find in thread | <kbd>Cmd</kbd> + <kbd>F</kbd> |27| | Find in task | <kbd>Cmd</kbd>/<kbd>Ctrl</kbd> + <kbd>F</kbd> |
26| | Previous thread | <kbd>Cmd</kbd> + <kbd>Shift</kbd> + <kbd>[</kbd> |28| | Previous task | <kbd>Cmd</kbd>/<kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>[</kbd> |
27| | Next thread | <kbd>Cmd</kbd> + <kbd>Shift</kbd> + <kbd>]</kbd> |29| | Next task | <kbd>Cmd</kbd>/<kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>]</kbd> |
28| | Dictation | <kbd>Ctrl</kbd> + <kbd>M</kbd> |30| **Input** | Dictation | <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>D</kbd> |
29 31
30To find, customize, or reset shortcuts, open **Settings > Keyboard Shortcuts**.32To find, customize, or reset shortcuts, open **Settings > Keyboard Shortcuts**.
31You can search by command name or switch the search field into keystroke mode33You can search by command name or switch the search field into keystroke mode
32and press the shortcut you want to find.34and press the shortcut you want to find.
33 35
34## Search past threads and find in a thread36## Search past tasks and find in a task
35 37
36Use thread search (<kbd>Cmd</kbd>/<kbd>Ctrl</kbd> + <kbd>G</kbd>) to reopen a38Use task search (<kbd>Cmd</kbd>/<kbd>Ctrl</kbd> + <kbd>G</kbd>) to reopen a past
37past conversation. When expanded matching is available in your Codex desktop39task. When expanded matching is available, it can also match task content and
38app, it can also match conversation content and Git branch names, so you can40Git branch names, so you can search for a phrase from the task or a
39search for a phrase from the thread or a branch such as `fix/login-redirect`.41branch such as `fix/login-redirect`.
40 42
41Use **Find in thread** (<kbd>Cmd</kbd> + <kbd>F</kbd>) after opening a thread43Use **Find in task** (<kbd>Cmd</kbd>/<kbd>Ctrl</kbd> + <kbd>F</kbd>) after opening
42to find text within that current conversation. It doesn't search across other44a task to find text within it. It doesn't search across other tasks.
43threads.
44 45
45## Slash commands46For actions that start with `/`, see [Slash commands](https://learn.chatgpt.com/docs/reference/slash-commands).
46
47Slash commands let you control Codex without leaving the thread composer. Available commands vary based on your environment and access.
48
49### Use a slash command
50
511. In the thread composer, type `/`.
522. Select a command from the list, or keep typing to filter (for example, `/status`).
53
54You can also explicitly invoke skills by typing `$` in the thread composer. See [Skills](https://developers.openai.com/codex/skills).
55
56Enabled skills also appear in the slash command list.
57
58### Available slash commands
59
60| Slash command | Description |
61| ------------- | -------------------------------------------------------------------------------------- |
62| `/feedback` | Open the feedback dialog to submit feedback and optionally include logs. |
63| `/goal` | Set a persistent goal for Codex to work toward; use `/plan` first to shape it. |
64| `/init` | Generate an `AGENTS.md` scaffold for the current project. |
65| `/mcp` | Open MCP status to view connected servers. |
66| `/plan` | Toggle plan mode for multi-step planning. |
67| `/review` | Start code review mode to review uncommitted changes or compare against a base branch. |
68| `/status` | Show the thread ID, context usage, and rate limits. |
69
70### Set or manage a goal with `/goal`
71
72Use `/goal` in the app composer to start Goal mode. A goal is a persistent
73objective that Codex works toward until it finishes the task, pauses, or needs
74more input. To define the goal with Codex first, start with `/plan`, then set
75the refined goal with `/goal`.
76
77If `/goal` doesn't appear in the slash command list, enable `features.goals`
78in `config.toml`:
79
80```toml
81[features]
82goals = true
83```
84
85You can also run `codex features enable goals` from the CLI or ask Codex to run it.
86
87<CodexScreenshot
88 alt="Codex app goal progress controls above the composer"
89 lightSrc="/images/codex/app/goal-dialog-light.webp"
90 darkSrc="/images/codex/app/goal-dialog-dark.webp"
91 class="mb-6"
92/>
93
94When a goal is active, the app shows its progress above the composer. Use the
95buttons in that progress row to pause or resume the goal, edit the goal text, or
96clear the goal instead of typing another slash command. You can keep steering
97Codex with follow-up messages while the goal runs.
98
99For guidance on writing effective goals, see [Goal mode](https://developers.openai.com/codex/prompting#goal-mode).
100 47
101## Deep links48## Deep links
102 49
103The Codex app registers the `codex://` URL scheme so links can open specific parts of the app directly. Encode query string values before adding them to a URL.50The ChatGPT desktop app keeps the `codex://` URL scheme for compatibility, so
51links can open specific parts of the app directly. Encode query string values
52before adding them to a URL.
104 53
105### Supported links54### Supported links
106 55
107Use these canonical forms when you create links. The sections below list the full reference by link type.56Use these canonical forms when you create links. The sections below list the full reference by link type.
108 57
109| Deep link | Opens |58| Deep link | Opens |
110| --------------------------------------------------------------------------- | ---------------------------------------------------------------- |59| --------------------------------------------------------------------------- | ------------------------------------------------------- |
111| `codex://threads/new` | A new local thread. |60| `codex://threads/new` | A new local task. |
112| `codex://new?<query>` | A new local thread with at least one new-thread query parameter. |61| `codex://new?<query>` | A new local task with at least one query parameter. |
113| `codex://threads/<thread-id>` | A local thread. `<thread-id>` must be the thread's session UUID. |62| `codex://threads/<thread-id>` | A local task. `<thread-id>` is its technical thread ID. |
114| `codex://settings` | Settings. |63| `codex://settings` | Settings. |
115| `codex://settings/connections/<connection-type>` | Computer, device, or SSH connection settings. |64| `codex://settings/connections/<connection-type>` | Computer, device, or SSH connection settings. |
116| `codex://settings/connections/ssh/add?name=<ssh-config-host>` | Adds a host from your SSH config to Codex. |65| `codex://settings/connections/ssh/add?name=<ssh-config-host>` | Adds a host from your SSH config to Codex. |
117| `codex://skills` | Skills. |66| `codex://skills` | Skills. |
118| `codex://automations` | Automations with the create flow open. |67| `codex://automations` | Scheduled with the create flow open. |
119| `codex://plugins/install/<plugin-name>?marketplace=<marketplace-name>` | The install flow for a plugin from a known marketplace. |68| `codex://plugins/install/<plugin-name>?marketplace=<marketplace-name>` | The install flow for a plugin from a known marketplace. |
120| `codex://plugins/<plugin-id>` | A plugin detail page. |69| `codex://plugins/<plugin-id>` | A plugin detail page. |
121| `codex://plugins/<plugin-name>?marketplacePath=<absolute-marketplace-path>` | A local plugin detail page from a local marketplace. |70| `codex://plugins/<plugin-name>?marketplacePath=<absolute-marketplace-path>` | A local plugin detail page from a local marketplace. |
122| `codex://pets/install?name=<pet-name>&imageUrl=<https-image-url>` | The pet install flow. |71| `codex://pets/install?name=<pet-name>&imageUrl=<https-image-url>` | The pet install flow. |
123 72
124### Threads73### Tasks
125 74
126Use these links when you need to open an existing local thread or start a new one.75Use these links when you need to open an existing local task or start a new one.
127 76
128| Deep link | Opens |77| Deep link | Opens |
129| ----------------------------- | -------------------------------------------------------------------------------------------------------------- |78| ----------------------------- | ------------------------------------------------------------------------------------------------------------ |
130| `codex://threads/<thread-id>` | A local thread. `<thread-id>` must be the thread's session UUID. |79| `codex://threads/<thread-id>` | A local task. `<thread-id>` is its technical thread ID. |
131| `codex://threads/new` | A new local thread. |80| `codex://threads/new` | A new local task. |
132| `codex://threads/new?<query>` | A new local thread with optional query parameters. |81| `codex://threads/new?<query>` | A new local task with optional query parameters. |
133| `codex://new?<query>` | A new local thread. Include at least one of `prompt`, `path`, or `originUrl`; otherwise the link does nothing. |82| `codex://new?<query>` | A new local task. Include at least one of `prompt`, `path`, or `originUrl`; otherwise the link does nothing. |
134 83
135For `codex://threads/new` or `codex://new`, add any of these query parameters as needed; you can combine them in the same URL.84For `codex://threads/new` or `codex://new`, add any of these query parameters as needed; you can combine them in the same URL.
136 85
137| Query parameter | Required | What it does |86| Query parameter | Required | What it does |
138| ---------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |87| ---------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
139| `prompt=<text>` | No | Sets the initial composer text. |88| `prompt=<text>` | No | Sets the initial composer text. |
140| `path=<absolute-path>` | No | Opens the new thread in a local workspace. `path` must be an absolute path to a local directory. When valid, Codex uses that directory as the active workspace. |89| `path=<absolute-path>` | No | Opens the new task in a local workspace. `path` must be an absolute path to a local directory. When valid, Codex uses that directory as the active workspace. |
141| `originUrl=<git-remote-url>` | No | Matches one of your current workspace roots by Git remote URL. If `path` is also present, Codex resolves `path` first. |90| `originUrl=<git-remote-url>` | No | Matches one of your current workspace roots by Git remote URL. If `path` is also present, Codex resolves `path` first. |
142 91
143Example: [Show me some fun stats about how I've been using Codex](codex://threads/new?prompt=Show%20me%20some%20fun%20stats%20about%20how%20I%27ve%20been%20using%20Codex)92Example: [Show me some fun stats about how I've been using Codex](codex://threads/new?prompt=Show%20me%20some%20fun%20stats%20about%20how%20I%27ve%20been%20using%20Codex)
144 93
94#### Start a task with a plugin
95
96To help users start a plugin-backed task, include a plugin mention in the
97prompt before you encode it:
98
99```text
100[@Example](plugin://example@openai-curated) Summarize this document: https://example.com/document/123
101```
102
103Encode the complete prompt as a URI component—for example, with
104`encodeURIComponent` in JavaScript—and pass it to the `prompt` parameter:
105
106```text
107codex://new?prompt=%5B%40Example%5D(plugin%3A%2F%2Fexample%40openai-curated)%20Summarize%20this%20document%3A%20https%3A%2F%2Fexample.com%2Fdocument%2F123
108```
109
110The link opens a new task with the decoded prompt in the composer. It doesn't
111send the prompt automatically. After the user sends it, Codex can use an
112installed plugin in that task. If the plugin isn't installed but is available
113to the user, Codex asks the user to install it and connect any required apps.
114After setup, the user can select **Continue** to resume the same task. Workspace
115settings can limit which plugins a user can install. For plugin installation
116and permission details, see [Plugins](https://learn.chatgpt.com/docs/plugins).
117
145### Settings118### Settings
146 119
147Use these links when you need to open Settings or a specific settings page.120Use these links when you need to open Settings or a specific settings page.
171| ---------------- | ------- |144| ---------------- | ------- |
172| `codex://skills` | Skills. |145| `codex://skills` | Skills. |
173 146
174### Automations147### Scheduled
175 148
176Use these links when you need to open Automations.149Use these links when you need to open **Scheduled**.
177 150
178| Deep link | Opens |151| Deep link | Opens |
179| --------------------- | -------------------------------------- |152| --------------------- | ------------------------------------ |
180| `codex://automations` | Automations with the create flow open. |153| `codex://automations` | Scheduled with the create flow open. |
181 154
182### Plugins155### Plugins
183 156
184Plugin links use different forms depending on whether you are installing from a marketplace, opening a plugin, or working from a local `marketplace.json`. For plugin basics, see [Plugins](https://developers.openai.com/codex/plugins). For local or repo marketplace setup, see [Build plugins](https://developers.openai.com/codex/plugins/build#build-your-own-curated-plugin-list).157Plugin links use different forms depending on whether you are installing from a marketplace, opening a plugin, or working from a local `marketplace.json`. For plugin basics, see [Plugins](https://learn.chatgpt.com/docs/plugins). For local or repo marketplace setup, see [Build plugins](https://learn.chatgpt.com/docs/build-plugins#build-your-own-curated-plugin-list).
185 158
186#### Plugin install159#### Plugin install
187 160
216 189
217#### Local plugin190#### Local plugin
218 191
219For local or repo marketplace setup, see [Build plugins](https://developers.openai.com/codex/plugins/build#build-your-own-curated-plugin-list).192For local or repo marketplace setup, see [Build plugins](https://learn.chatgpt.com/docs/build-plugins#build-your-own-curated-plugin-list).
220 193
221| Deep link | Opens |194| Deep link | Opens |
222| --------------------------------------------------------------------------- | ---------------------------------------------------- |195| --------------------------------------------------------------------------- | ---------------------------------------------------- |
236| `codex://pets/install?name=<pet-name>&imageUrl=<https-image-url>` | The pet install flow. |209| `codex://pets/install?name=<pet-name>&imageUrl=<https-image-url>` | The pet install flow. |
237 210
238| Query parameter | Required | What it does |211| Query parameter | Required | What it does |
239| ---------------------------- | -------- | ------------------------------------------------- |212| ------------------------------ | -------- | ------------------------------------------------------------------------------------------- |
240| `name=<pet-name>` | Yes | Sets the pet name. |213| `name=<pet-name>` | Yes | Sets the pet name. The value must contain at least one non-whitespace character. |
241| `imageUrl=<https-image-url>` | Yes | Sets the pet image URL. `imageUrl` must be HTTPS. |214| `imageUrl=<https-image-url>` | Yes | Provides an absolute HTTPS URL for the pet image or sprite sheet. |
242| `description=<text>` | No | Sets the optional pet description. |215| `description=<text>` | No | Adds a description to the install flow. |
216| `spriteVersionNumber=<1-or-2>` | No | Selects the sprite-sheet format. The default is `1`; the only other supported value is `2`. |
217
218The install link accepts only these query parameters. Invalid names, non-HTTPS
219image URLs, unsupported sprite versions, or extra path segments cause the link
220to do nothing.
243 221
244## See also222## See also
245 223
246- [Features](https://developers.openai.com/codex/app/features)224- [Features](https://learn.chatgpt.com/docs/features)
247- [Settings](https://developers.openai.com/codex/app/settings)225- [Settings](https://learn.chatgpt.com/docs/reference/settings)
226- [Slash commands](https://learn.chatgpt.com/docs/reference/slash-commands)