Skip to content

TUI UX: decouple transcript scrolling from prompt input focus (tmux-friendly) #15874

@nobodyzxc

Description

@nobodyzxc

What variant of Codex are you using?

CLI

What feature would you like to see?

Problem

When working with long outputs (especially in tmux), I often need to scroll up to inspect earlier content while simultaneously drafting the next prompt.

Currently, scrolling and input focus feel tightly coupled:

  • I have to leave my current input context to scroll (e.g. tmux copy mode)
  • Then return back to the prompt to continue typing
  • This breaks the flow when iterating quickly

Expected Behavior

Allow users to scroll the transcript/output viewport independently while keeping the prompt input always editable.

Proposed interaction model

  • Input box remains focused and editable at all times
  • Viewport (chat/output) can be scrolled independently via keybindings:
    • Ctrl-J / Ctrl-K (line-wise, though conflicts with newline key binding)
    • or Ctrl-D / Ctrl-U (page-wise)
  • Esc jumps back to bottom (follow mode)
  • Optional:
    • Auto-follow (scroll to bottom) after sending a prompt
    • Or auto-return after some idle time

Why this matters

This is especially important in workflows with:

  • long outputs (code, logs, analysis)
  • tmux / terminal multiplexers
  • iterative prompting (read → refine → ask again)

Without this, users constantly context-switch between:

  • scrolling mode
  • input mode

which adds friction to rapid iteration.

Related Issues

Example workflow (current vs desired)

Current:

  1. Scroll up (tmux copy mode)
  2. Exit copy mode
  3. Type prompt
  4. Repeat

Desired:

  1. Scroll up (within Codex TUI)
  2. Keep typing prompt without losing context
  3. Press Esc to jump back to bottom if needed

Additional context

This pattern is common in tools like terminal pagers (less, bat) and chat apps where scrollback and input are decoupled.

It would make Codex TUI much smoother for real-world dev workflows.


If this direction makes sense, I'm happy to open a PR.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    TUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal displayenhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions