Propose “Optimize Your Input” feature for Codex TUI (triggered by CTRL+P)

Resolved 💬 1 comment Opened Aug 19, 2025 by aldiz1711 Closed Nov 27, 2025

What feature would you like to see?

I would like to propose an “Optimize Your Input” feature in the Codex TUI, triggered by pressing CTRL+P.
This feature should take the text currently written in the composer, rewrite it into a clearer and more concise instruction, and replace the draft with the optimized version—without creating a new conversation turn or modifying the conversation history/context window.

Key points:
• Triggered with CTRL+P.
• Shows a short “optimizing input…” indicator in the TUI.
• Replaces composer text with the optimized version.
• Does not add a new entry in conversation history.
• Context window remains unchanged.
• Token usage is counted but not deducted from the “Context Left” indicator.
• Cancelable with CTRL+C, restoring the original text.

This will serve as a built-in prompt refinement tool, improving user experience and reducing back-and-forth editing.

Are you interested in implementing this feature?

Yes, I am interested in implementing this feature.
I have already opened a related Pull Request (#2426) that introduces this functionality.

Additional information

  • This feature is implemented using an ephemeral input operation that is processed separately and not logged in the main conversation state.
  • Token accounting and cancellation flow have been handled in the PR.
  • The proposed implementation improves usability while keeping context clean and predictable.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗