Skip to content

Support Plan mode in the CLI and TS SDK #13377

Closed as not planned
Closed as not planned

Description

@gsabran

What variant of Codex are you using?

CLI, ts SDK

What feature would you like to see?

The CLI (and the TS SDK that uses the CLI) don't support plan mode. It would be great if they did!

Additional information

No response

Activity

  1. etraut-openai commented on Mar 3, 2026

    @etraut-openai
    Contributor

    The CLI does support plan mode. Just use the /plan slash command to toggle.

  2. gsabran commented on Mar 3, 2026

    @gsabran
    Author

    I meant in headless mode, ie the CLI doesn't have a parameter to be prompted in plan mode (updated the description)

  3. added
    execIssues related to the `codex exec` subcommand
    and removed
    CLIIssues related to the Codex CLI
    on Mar 3, 2026
  4. gsabran commented on Mar 3, 2026

    @gsabran
    Author

    There seem to be a comment indicating interest to support this:

    // TODO (aibrahim): Consolidate config.model and config.model_reasoning_effort into config.collaboration_mode
    // to avoid extracting these fields separately and constructing CollaborationMode here.

  5. gsabran commented on Mar 3, 2026

    @gsabran
    Author

    I made a PR, I don't think I can open it as I'm not a collaborator to this repo:

    https://github.com/openai/codex/compare/main...gsabran:gui/plan-exec?expand=1

  6. g-imhoff commented on Mar 9, 2026

    @g-imhoff

    Also very interested about getting this !

  7. 0xble commented on Mar 25, 2026

    @0xble

    Strong +1 on this.

    The missing piece is not interactive /plan, it is a first-class startup parameter for Plan mode.

    What would be most ergonomic is something like:

    • codex --plan
    • codex --plan "investigate this repo and propose a fix"

    Possibly also:

    • codex exec --plan "..."

    Why this matters:

    • /plan only works after the session starts
    • wrappers and orchestrators cannot express startup intent cleanly
    • prompt-level /plan shims are brittle and less discoverable than a real flag
    • this matches precedent from Claude, which exposes startup plan mode via --permission-mode plan

    I would treat this as distinct from "Plan mode exists" and closer to "Plan mode is not addressable as a first-class CLI startup mode".

  8. bluerssen commented on May 7, 2026

    @bluerssen

    Still looking for this. This should be possible via SDK. I'd be happy to do PR to add it in.

  9. etraut-openai commented on May 7, 2026

    @etraut-openai
    Contributor

    The SDK is intended for non-interactive automation use cases. Plan mode is an interactive feature, so it's not something that's exposed in codex exec (upon which the SDK is built).

    If you'd like to use plan mode in a custom client, I recommend building your client on the app server API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestexecIssues related to the `codex exec` subcommand

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions