Skip to content

Add /reasoning slash command to change reasoning effort mid-conversation #2106

Description

@zemaj

Feature Request

Problem

Currently, users need to restart their Codex session or modify the config.toml file to change the reasoning effort level. This is inconvenient when working on tasks that vary in complexity during a single session.

Solution

Add a /reasoning slash command that allows users to change the reasoning effort level mid-conversation.

Features

  • Parameter support: /reasoning <level> to set a specific level directly

    • /reasoning high - Sets reasoning to high
    • /reasoning medium or /reasoning med - Sets reasoning to medium
    • /reasoning low - Sets reasoning to low
    • /reasoning none or /reasoning off - Disables reasoning
  • Interactive UI: /reasoning without parameters shows an interactive selection UI

    • Shows current reasoning level highlighted in yellow
    • Use arrow keys (↑↓) to navigate options
    • Press Enter to select a level
    • Press Esc to cancel
    • Each option shows a helpful description

Benefits

  • Flexibility: Change reasoning effort without restarting the session
  • Control: Adjust the model's reasoning depth based on task complexity
  • Efficiency: Use lower effort for simple tasks, higher for complex ones
  • Transparency: Clear feedback about the current reasoning level

Implementation Details

The implementation modifies several files in the TUI module to add the new command, handle parameter parsing, create an interactive selection UI, and update the session configuration dynamically.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions