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

Resolved 💬 9 comments Opened Mar 26, 2026 by nobodyzxc Closed May 10, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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

  • #3049 (custom keybindings) — related, but this is more about interaction model than just remapping keys
  • #1064 (scrolling support)
  • #13472 (auto-scroll behavior)

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_

View original on GitHub ↗

9 Comments

github-actions[bot] contributor · 3 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #14045
  • #14130
  • #14098

Powered by Codex Action

nobodyzxc · 3 months ago

Related but different in scope: #14045, #14130, #14098

dagelf · 3 months ago

Relevant context https://github.com/openai/codex/issues/8344

If you're on Linux, you can just script -q -f /tmp/codex.log -c codex

And then in another terminal/pane/window tail -f /tmp/codex.log

cweill · 3 months ago

The problem I see is that when my tmux is split into a grid of codex workers, the codex prompts hover at the top of the panes instead of the bottom, despite having thousands of lines of scrollback. This typically happens after a pane resize or SIGWINCH trigger.

<img width="660" height="1434" alt="Image" src="https://github.com/user-attachments/assets/1a43e575-ed01-4327-9dd3-9ddc1f9197ad" />

dagelf · 3 months ago

That's an artifact of what it does on resize. I think this patch fixes it https://github.com/dagelf/codex/tree/displayfix

etraut-openai contributor · 2 months ago

This feature request hasn't received enough upvotes, so I'm going to close it.

tankywoo · 2 months ago

+1, Want to allow scrolling of the output history while keeping the prompt input fixed, like an opencode tui.

Jurio0304 · 1 month ago

I ran into the same issue during long terminal sessions, especially when using Codex over SSH and inside tmux.

I implemented a lightweight community fork called Codex Sticky that adds this sticky-on-scroll composer behavior:

https://github.com/Jurio0304/codex-sticky

When scrolling back through older transcript content, the composer remains reachable at the bottom of the terminal. The fork is installed side by side as codex-sticky, so it does not overwrite the official codex command.

It is currently intended as a small, unofficial workaround for Linux x86_64 users while keeping the experience close to upstream. Feedback is very welcome.

Jurio0304 · 1 month ago
+1, Want to allow scrolling of the output history while keeping the prompt input fixed, like an opencode tui.

I implemented a lightweight community fork called Codex Sticky that adds this sticky-on-scroll composer behavior:

https://github.com/Jurio0304/codex-sticky