You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(native-chat): suggested prompts in Codex chats - #48472
Codex chats now guess what you'll type next and show it as grey text in the empty message box, the same way Claude chats already do. Press Tab to use it. Nothing is sent unless you do.
Files
Added
Deleted
Net
Test
0
0
0
0
Prod
19
$\color{#1a7f37}{\Huge{\mathbf{+}}}$207
$\color{#cf222e}{\Huge{\mathbf{−}}}$40
$\color{#1a7f37}{\Huge{\mathbf{+}}}$167
What Changed
Before: suggested prompts only appeared after Claude replies. A Codex chat always showed "Ask anything…".
After: when a Codex turn finishes, Orca asks Codex for a guess at your next message. If one comes back, the empty composer shows it. Starting the next turn clears it.
How it works: Codex's app-server has thread/sample (0.164 and later, behind the experimentalApi capability Orca already sends at initialize). It runs one turn on a hidden, throwaway fork of the thread, using the thread's own model and auth with the prompt cache, and returns the text. The fork never touches the real thread or writes a rollout. This is the same call the Codex desktop app uses for its composer predictions, and Orca sends the same composer_prediction request metadata.
Only runs while a chat that shows suggestions is open and the Suggested prompts setting is on, through the existing interest signal the Claude path uses.
Only after a turn that ended completed, on the main thread (not subagents).
A guess that arrives after a send, a new turn or a relaunch is dropped. Codex also rejects a sample whose source turn is no longer the latest.
On a Codex without thread/sample, the first refusal turns it off for that process.
The setting's copy now says "Claude or Codex" and "that agent's usage", in all 12 languages.
Why
#48405 asks for suggestions in Codex and Pi chats, because Codex is many people's main agent and Claude's suggestions cost Claude usage. The open-source app-server declares a thread/prediction/updated notification but never sends it (thread/prediction/request returns "not implemented yet" through 0.174 alpha), so Orca has to ask with thread/sample itself. Generating the guess in Orca with its own model call would mean copying each provider's auth, which isn't practical.
Linked Issue
Part of #48405. This covers Codex only. Pi still needs a way to feed a guess back (an Orca Pi extension is the likely route), so the issue stays open.
Visual Proof
Before: after a Codex reply, the composer showed only "Ask anything, @ to mention files, / for commands".
After: a real Codex 0.167.2 chat in a hidden dev build. The grey text in the composer is Codex's guess.
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns
macOS, hidden dev build, Codex 0.167.2, two fresh chats and one resumed chat over eight turns:
Every turn that left a next step got a guess, typically 5–10 s after the reply. Example guesses: "Read todo.py and tell me what commands it supports.", "Implement add and list commands in todo.py, saving todos to a local JSON file." "Thanks, that's all for now." got none.
Tab put the guess into the composer. Sending the next message cleared it at once.
Switching tabs moved interest to the visible chat. The transcript showed no extra rows from the samples, and no rollout files were left for them.
Probed the protocol directly as well: a stale expectedTurnId is refused with "sample source turn must be the latest finished turn".
No unit test. The logic is wiring plus stale checks, and the run above covers it.
Performance
One extra model request per finished Codex turn, and only while that chat is open with the setting on. In the runs above each request was about 27k input tokens, 75–98% of them cached, plus 30–190 output tokens. Nothing changes for the main process, renderer or disk.
Risk
Each guess counts toward the user's Codex usage, unless OpenAI exempts requests tagged composer_prediction (the issue says the desktop app's are free during the beta). Orca can't confirm that. The setting turns it off, and its copy now says so for Codex too. If a sample misbehaves, the worst case is a missing or stale grey hint. A plain revert backs it out.
Level: Low
AI Disclosure
Review
Agent skill upstream boundary
Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
The host adapter publishes the guess, so SSH and paired hosts get it once they run this build. An older host publishes nothing, as today. Mobile doesn't show suggestions for any agent yet.
Checklist
This PR is small and focused
I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
I stated the risk: what could break, for whom, and how to back it out
Before/after screenshots or videos attached for UI changes, or N/A with reason
Self-reviewed for correctness, security, and performance
Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)
Codex sessions can now request prompt predictions after completed turns when the setting is enabled and a reader is interested. The adapter validates responses and checks session and turn state before publishing suggestions. Method-refusal detection is shared with background terminal handlers. The adapter also delegates live-provider-process checks to a new predicate. Settings descriptions and translations now refer to both Claude and Codex.
Merge Risk: Low · up to 6a465
Codex chats gain suggested prompts. A suggestion can still appear after the user turns the setting off, and the settings text may misstate whether suggestions count toward usage. Both are small issues to fix before or soon after merge.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "feat(native-chat): suggested prompts in Codex chats" names the main change: suggested prompts (grey composer hints) now appear in Codex chats. The changeset adds CodexComposerPredictions, t…
Description check
The description follows the template: ELI5, What Changed, Why, Linked Issue (Part of #48405, which is a partial link rather than a closing reference), Visual Proof with before/after, Testing, Performa…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "feat(native-chat): suggested prompts in Codex chats" names the main change: suggested prompts (grey composer hints) now appear in Codex chats. The changeset adds CodexComposerPredictions, the thread/sample request, and the settings copy update for Codex. The title is specific and matches the primary change.
Full details: Description check
Explanation
The description follows the template: ELI5, What Changed, Why, Linked Issue (Part of #48405, which is a partial link rather than a closing reference), Visual Proof with before/after, Testing, Performance, Risk with level Low, Agent skill upstream boundary, Notes, and Checklist. Gaps: the AI Disclosure section is empty, the Review section is empty, and the Linked Issue uses 'Part of' instead of 'Fixes #'. The checklist leaves lint, typecheck, test, and build unchecked, and no unit test was added, which the author explains. The description is substantially complete.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Re-check the Suggested prompts setting before publishing a pending sample.
When the user disables Suggested prompts during a thread/sample request, the result can still reach the composer. The setting is read only before the request starts. The publish guard checks reader interest, but reader interest does not change when the setting changes, and the delivery path does not read the setting. Add the same setting check to the publish guard so a disabled setting drops the stale result.
"promptSuggestionsCopy": "After Claude replies, its guess at your next message shows in the empty message box. Press Tab to use it. Each guess is an extra request that counts toward your Claude usage.",
"promptSuggestionsCopy": "After Claude or Codex replies, its guess at your next message shows in the empty message box. Press Tab to use it. Each guess is an extra request that counts toward that agent's usage.",
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Remove the Codex usage claim from the composer prediction copy.
The promptSuggestionsCopy string states that each suggestion counts toward the agent's usage. For Codex, OpenAI's documentation says composer predictions do not count toward Codex usage limits or consume credits during the beta. Users who read the string receive incorrect billing information about Codex.
Correct the Codex part of the sentence so it matches the documented beta behavior. The string applies to both agents, so the sentence needs restructuring. Choose the exact wording and whether to add a beta condition. Apply the same change to the matching promptSuggestionsCopy key in the other 11 locale files that this PR changes.
"promptSuggestionsCopy": "Claude yanıt verdikten sonra, bir sonraki mesajınız için tahmini boş mesaj kutusunda görünür. Kullanmak için Tab tuşuna basın. Her tahmin, Claude kullanımınıza sayılan ek bir istektir.",
"promptSuggestionsCopy": "Claude veya Codex yanıt verdikten sonra, bir sonraki mesajınız için tahmini boş mesaj kutusunda görünür. Kullanmak için Tab tuşuna basın. Her tahmin, o ajanın kullanımına sayılan ek bir istektir.",
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Remove the unconditional usage claim from the prediction copy.
The string says every prediction counts toward the agent's usage. The PR states that this accounting is unconfirmed for composer_prediction requests. The official Codex beta documentation also says prediction generation does not count toward usage limits. The copy therefore asserts a usage effect that the available evidence does not support, and it may mislead users about cost.
Change the sentence so it does not state a usage effect as fact. Keep the Claude and Codex scope and the Tab behavior. Apply the same change to the matching prediction-copy strings in the other two translations named in the comment.
Codex's app-server can sample a hidden fork of the thread (`thread/sample`),
which is how its desktop app makes composer predictions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
Codex chats now guess what you'll type next and show it as grey text in the empty message box, the same way Claude chats already do. Press Tab to use it. Nothing is sent unless you do.
What Changed
Before: suggested prompts only appeared after Claude replies. A Codex chat always showed "Ask anything…".
After: when a Codex turn finishes, Orca asks Codex for a guess at your next message. If one comes back, the empty composer shows it. Starting the next turn clears it.
How it works: Codex's app-server has
thread/sample(0.164 and later, behind theexperimentalApicapability Orca already sends at initialize). It runs one turn on a hidden, throwaway fork of the thread, using the thread's own model and auth with the prompt cache, and returns the text. The fork never touches the real thread or writes a rollout. This is the same call the Codex desktop app uses for its composer predictions, and Orca sends the samecomposer_predictionrequest metadata.completed, on the main thread (not subagents).thread/sample, the first refusal turns it off for that process.Why
#48405 asks for suggestions in Codex and Pi chats, because Codex is many people's main agent and Claude's suggestions cost Claude usage. The open-source app-server declares a
thread/prediction/updatednotification but never sends it (thread/prediction/requestreturns "not implemented yet" through 0.174 alpha), so Orca has to ask withthread/sampleitself. Generating the guess in Orca with its own model call would mean copying each provider's auth, which isn't practical.Linked Issue
Part of #48405. This covers Codex only. Pi still needs a way to feed a guess back (an Orca Pi extension is the likely route), so the issue stays open.
Visual Proof
Before: after a Codex reply, the composer showed only "Ask anything, @ to mention files, / for commands".
After: a real Codex 0.167.2 chat in a hidden dev build. The grey text in the composer is Codex's guess.
Testing
macOS, hidden dev build, Codex 0.167.2, two fresh chats and one resumed chat over eight turns:
expectedTurnIdis refused with "sample source turn must be the latest finished turn".No unit test. The logic is wiring plus stale checks, and the run above covers it.
Performance
One extra model request per finished Codex turn, and only while that chat is open with the setting on. In the runs above each request was about 27k input tokens, 75–98% of them cached, plus 30–190 output tokens. Nothing changes for the main process, renderer or disk.
Risk
Each guess counts toward the user's Codex usage, unless OpenAI exempts requests tagged
composer_prediction(the issue says the desktop app's are free during the beta). Orca can't confirm that. The setting turns it off, and its copy now says so for Codex too. If a sample misbehaves, the worst case is a missing or stale grey hint. A plain revert backs it out.Level: Low
AI Disclosure
Review
Agent skill upstream boundary
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
The host adapter publishes the guess, so SSH and paired hosts get it once they run this build. An older host publishes nothing, as today. Mobile doesn't show suggestions for any agent yet.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)