Add context-aware suggested next prompts to the composer
What variant of Codex are you using?
Codex CLI 0.153.0. The request could also benefit the App and IDE Extension composers.
What feature would you like to see?
Add an optional context-aware suggestion for the logical next user prompt after Codex completes a turn.
For example, after implementing a change, Codex could suggest:
Run the full test suite and fix any failures.
The suggestion could appear as ghost text or a suggestion chip in the composer. A user should be able to accept it with Tab or Right Arrow, dismiss it with Escape, or simply start typing something else. It must never run automatically.
This is similar to the next-step suggestions available in Claude Code and would reduce repetitive typing during common agentic loops such as implement, test, review, and commit.
Ideally this would be opt-in through a setting and generated from the current conversation and workspace state, so it recommends a concrete next action rather than a generic canned prompt.
Additional information
There currently appears to be shell completion and support for reusable custom prompts, but no native option for dynamically predicting the next conversational prompt. A static AGENTS.md instruction can make Codex print a recommendation in its response, but it cannot prefill or offer that recommendation directly in the composer.
+1 for this in the Codex macOS desktop app and TUI. The workflow I’d love: after Codex finishes replying, suggest a context-aware next prompt as grey text in the empty composer. Tab accepts it into an editable draft; Enter sends it. Typing something else dismisses it. I found the CLI implementation in #47911 and #47929, followed by its removal in #48621. Is this still being considered or was there a reason for moving away from it? The existing “Suggested prompts” setting appears to cover home-screen suggestions. An opt-in option for suggestions within an ongoing conversation would be useful for common follow-ups like testing, reviewing, and committing changes.
I would really like this in the Codex desktop app too. After an agent finishes a response, having a relevant next-step prompt suggested directly in the input box would make it much easier to keep working, like the behavior in Claude Code.
An optional setting, with suggestions that can be accepted, edited, or dismissed and never sent automatically, would be ideal. Please consider adding this to the desktop app as well as the CLI.
I’ve put together a community fork based on Codex CLI 0.161.0 that restores the composer suggestions removed in #48621. The goal is to reduce repetitive typing for follow-ups such as testing, reviewing, and committing changes.
The behavior closely matches this request:
- After a successful response, a suggested next prompt can appear as dim text in the empty composer.
- Tab or Right Arrow copies it into an editable draft; Enter sends it.
- Escape dismisses it, and typing hides it. Suggestions are never submitted automatically.
- Existing drafts, attachments, popups, and custom key bindings take precedence.
- New turns and thread changes cancel pending suggestions; failed, interrupted, and replayed turns do not trigger generation.
The generation approach differs from the earlier implementation: it uses Codex’s isolated structured-request mechanism with bounded recent conversation text and low reasoning effort. Suggestion requests have no tools or environment access, and time out after 30 seconds. Each eligible response adds a model request and consumes usage, so explicit user control over the feature matters.
Implementation notes describe the behavior and isolation. Community builds are available for:
These install a separate codex-suggest command and preserve the ordinary codex command.
I understand the current contribution policy and am sharing this as design feedback and a reference implementation. Would the team consider restoring in-conversation prompt suggestions as an opt-in feature? Were there product or technical concerns behind #48621 that a revised design would need to address?
They added it to desktop app https://x.com/OpenAIDevs/status/2108624138369929725
Please consider restoring context-aware next-message suggestions in the Codex CLI TUI as an opt-in feature.
I use Codex CLI 0.162.1 on macOS/Apple Silicon. I can use conversation-aware follow-up suggestions in the ChatGPT desktop app, but the CLI does not expose the same workflow. Suggestions in an ongoing conversation help me continue common implement → test → review loops with less repetitive typing, especially when the conversation is in Chinese. Static placeholder examples and recommendations printed in the assistant's final answer do not provide the same editable composer interaction.
The implementation history makes this look like a removed capability rather than a feature that has never existed:
- #47911 added the composer UI and the opt-in
tui.prompt_suggestionssetting on September 24. - #47929 connected generation after successful turns on the same day.
- #48621 removed generation, rendering, keyboard handling, and the configuration option on September 27.
I could not find a rationale in the removal PR or its discussion. Could the team clarify whether the removal was temporary, or whether product, cost, accessibility, or technical concerns prevent bringing it back?
The behavior I would find useful is:
- Optional and explicitly controllable, with clear disclosure that generation consumes additional usage.
- Show one context-aware suggestion only in an empty composer; preserve anything the user has typed.
- Tab accepts it into an editable draft; a separate Enter sends it. Typing or Escape dismisses it. Never submit automatically.
- Cancel stale suggestions on new turns or thread changes, and allow no suggestion when the task is complete.
- Keep background generation from running workspace tools or triggering ordinary completion sounds/notifications and user Stop hooks as though another visible task had completed.
Adding this here rather than opening a duplicate request. The existing desktop experience is useful; I would like the same optional workflow in the CLI.
I'd like to add a desktop-app use case to this request: automatically suggest a relevant follow-up question after a response, with one-click insertion into an editable composer draft.
In AutoCode, a suggested next question appears after the assistant finishes answering, and I can quickly fill it into the input box. I find this useful for ordinary Q&A and exploratory conversations, not just implement/test/review coding loops.
In my current Codex desktop experience, I have not found an equivalent automatic, easy-to-discover workflow. The assistant can include clickable follow-up suggestions in its answer, but that feels less convenient than a consistent native composer feature.
The behavior I would like is:
- After a completed response, automatically show a small, context-aware follow-up suggestion near the composer, including in ongoing conversations.
- Clicking the suggestion inserts the full question into an editable draft. It should not send the message or start work automatically.
- Preserve any existing draft; let the user edit, ignore, or dismiss the suggestion.
- Match the conversation language, including Chinese.
- Provide a clearly named setting so the feature is easy to find and enable or disable.
I see comments saying a similar feature is already available in the desktop app. If this has shipped, could the team clarify the setting/location and any availability restrictions? My feedback is that the native post-response suggestion workflow should be easy to discover and consistently available when enabled. Otherwise, please consider this additional support for bringing the requested experience to the desktop app.
Adding this here rather than opening a duplicate feature request, as requested by the repository's issue template.
I find next-prompt suggestions in Desktop really useful. Please bring them back to the CLI as well.
Adding another vote for bringing this back. I found the context-aware prompt suggestions really useful. Sometimes the AI picks up on what I'm trying to achieve and suggests a next step better than I could put into words myself. It wasn't just about saving typing; the suggestions helped me figure out what I actually wanted to ask next.
This was a great feature, and I really hope it comes back to Codex!
Please restore optional next-prompt predictions in Codex CLI, similar to Claude Code and Codex desktop’s Composer Predictions. Show the suggestion directly in the input box, let Tab accept it as an editable draft, and never send it automatically. Printing a suggested prompt in the assistant’s response doesn’t provide the same convenient workflow.
+1 for restoring the opt-in tui.prompt_suggestions that shipped in #47911 / #47929 and was removed in #48621.
One additional use case: I run Codex CLI against non-OpenAI models through a custom model_provider (a local OpenAI-compatible proxy). The removed implementation generated suggestions in a hidden, ephemeral fork of the completed thread, so it used the session's own model and provider. That design works with custom providers without additional configuration, which is a good reason to keep it if the feature returns.
Requests, if it comes back:
- Keep it opt-in and off by default, as in #47911.
- Generate it with the session's active provider/model, or allow an optional
tui.prompt_suggestion_modeloverride so a cheaper model can be used. - Never send automatically; Tab/Right Arrow accepts into an editable draft, typing or Esc dismisses.
- Document the extra request per turn, since it counts toward usage/cost.
Could the team share why #48621 removed it (quality, cost, or a rework toward the desktop "Composer Predictions")? That would help people decide whether to wait or to maintain a local patch.
Environment: Codex CLI 0.160.0, macOS.
+1 for restoring the opt-in prompt suggestions in the TUI.
One more use case: I run Codex CLI inside a terminal multiplexer with a browser and phone front end. That front end already shows Claude Code's suggestion, because Claude Code draws it as dim ghost text in the empty composer, and the front end reads it from the screen and offers it as a one-tap draft. With Codex there is nothing to show. If the feature comes back, please draw it the same way: dim ghost text, only in the empty composer, only when the turn is done, never sent automatically. Then wrappers like this can offer it too.
+1 for restoring the opt-in prompt suggestions in the TUI
+1 for restoring this feature.