Repository work often needs a conversation that can follow questions across files. A Codex interactive session keeps requests, command activity, and replies together in the terminal, with the current project as its working directory.

The terminal interface requires an installed Codex CLI and an interactive terminal. A ChatGPT or API-key login provides access to OpenAI models, and a cached login usually avoids another sign-in prompt.

Project trust controls whether Codex can use folder settings, which may run code automatically. Permissions also govern file changes and command execution, so a familiar project and a small first request provide a sensible starting point.

Codex can read project files and, when permissions allow, edit files or run programs. A project can contain instructions and settings that affect its behavior; only trust folders whose contents you trust.

Steps to start a Codex interactive session:

  1. Open a terminal in the project directory where you want to use Codex.

    The terminal’s current directory determines the project Codex opens.
    Related: How to set the working directory for Codex

  2. Start the Codex terminal interface.
    $ codex

    Your saved settings determine permissions and other defaults.

  3. Complete sign-in if Codex displays an authentication prompt.

    The Sign in with ChatGPT option opens a browser sign-in flow. A valid cached login skips this prompt.
    Related: How to log in to Codex with device authentication
    Related: How to log in to Codex CLI with an API key

  4. Approve access to the project only if you trust its contents.

    The Trust this folder? prompt warns that folder settings can run code automatically, even without a model request. The Trust and continue option saves the decision; a previously trusted folder may not show this prompt.

  5. Check that the ready prompt shows the intended project directory.

    The displayed model can vary with your account and configuration.
    Related: How to set the default model in Codex

  6. Submit a harmless first request at the Codex prompt.

    The request text is What is 19 + 23? Reply in one short sentence. The Enter key submits it.

  7. Confirm that the reply gives the sum as 42 and the input prompt is ready for a follow-up.

    A completed answer confirms that the interactive session reached a model and returned a response. A connection error or an unanswered prompt does not.

Share this guide