context-aware autocomplete/suggestion functionality

Resolved 💬 1 comment Opened Aug 23, 2025 by mkusaka Closed Nov 28, 2025

What feature would you like to see?

I would like to request a context-aware autocomplete feature for the Codex CLI input field. This feature would provide intelligent, real-time suggestions for completing prompts based on the current conversation context.

Feature Description

When typing in the input field, the CLI should:

  • Analyze the current conversation context (previous messages, code being discussed, files opened)
  • Predict and suggest likely completions for the prompt being typed
  • Display suggestions inline as ghost text (grayed out) after the cursor
  • Allow Tab key to accept the suggestion

Examples

  1. Code-related context:
  • After discussing a Python function, typing "add error h..." → suggests "add error handling to this function"
  • After viewing a React component, typing "convert to..." → suggests "convert to TypeScript"
  1. Task continuation:
  • After fixing a bug, typing "now run..." → suggests "now run the tests"
  • After refactoring code, typing "update the..." → suggests "update the documentation"
  1. Pattern recognition:
  • If user frequently asks "explain this code", typing "exp..." → suggests "explain this code"
  • Learning from user's common phrase patterns and suggesting completions

Implementation Approach

  • Use the conversation history and current context to generate predictions
  • Could leverage the same LLM with a specialized prompt for completion
  • Cache common patterns for faster response
  • Make it configurable (on/off) in settings

Are you interested in implementing this feature?

No, but I'm happy to test and provide feedback.

Additional information

This differs from simple command/file completion (which already exists) by providing intelligent, context-aware suggestions for the actual prompt content. It would make the Codex CLI feel more responsive and intelligent, similar to how modern IDEs provide code completion.

View original on GitHub ↗

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