AI / Core OpenAI Codex Application Fundamentals Interview Questions
What is the Codex CLI and what are its key features?
The Codex CLI is an open-source, terminal-native agentic coding tool that brings OpenAI's coding models directly into your command line. It was rebuilt in 2025 around agentic workflows, making it significantly more capable than a simple code-generation prompt wrapper.
| Feature | Description |
|---|---|
| Agentic execution | Works through multi-step tasks autonomously - reads files, writes code, runs tests |
| Image input | Attach screenshots, wireframes, and diagrams to build shared context |
| To-do tracking | Tracks progress on complex tasks with a visible to-do list |
| Web search | Built-in web search for looking up APIs and documentation |
| MCP support | Connect to Model Context Protocol servers for external tool integration |
| Three approval modes | read-only, auto (workspace-scoped), full-access (network + anywhere) |
| Model selection | --model flag or /model command; defaults to gpt-5.4 if unspecified |
| Thread management | /model command switches model mid-thread; --model flag sets it at start |
# Installation npm install -g @openai/codex # Basic usage - interactive session codex # Run with a specific model codex --model gpt-5.5 # Execute a single task non-interactively codex exec "Add comprehensive docstrings to all public functions in src/" # Exec with specific model codex exec --model gpt-5.4-mini "Fix all linting errors in utils.py" # Change model during an active thread: # /model gpt-5.5 # Specify model in config.toml: # [codex] # model = "gpt-5.5"
The CLI and IDE extension share the same config.toml configuration file. Authentication supports both ChatGPT account sign-in (for ChatGPT subscribers) and API key authentication (for direct API access).
More Related questions...