Skip to content

Zellij scrollback still broken with --no-alt-screen (full-screen redraw in main buffer) #10331

Closed as duplicate

Description

@DamianPala

What version of Codex is running?

0.93.0

What subscription do you have?

Plus

Which model were you using?

No response

What platform is your computer?

Linux 6.2.0-35-generic x86_64 x86_64

What terminal emulator and version are you using (if applicable)?

Ghostty

What issue are you seeing?

Scrollback in Zellij still does not work even when alternate screen is disabled (--no-alt-screen / tui.alternate_screen="never"). This looks like a different root cause than #2558: Codex keeps doing full-screen redraws in the main buffer (cursor addressing, clears, scroll regions), so Zellij does not accumulate scrollback lines.

Versions

  • codex-cli: 0.93.0
  • zellij: 0.43.1
  • OS: Linux
  • TERM: xterm-256color

Environment notes

  • ZELLIJ is 0 by default in my session; I also tested with ZELLIJ=1 explicitly and behavior did not change.

What steps can reproduce the bug?

  1. Start Zellij.
  2. Run: codex --no-alt-screen
    (also tested codex -c 'tui.alternate_screen="never"' --no-alt-screen)
  3. Generate enough output to exceed pane height.
  4. Enter Zellij scroll/copy mode and try to scroll back.

What is the expected behavior?

Expected

Zellij pane scrollback should show earlier Codex output when alternate screen is disabled.

Actual

Only the current screen is visible; scrollback remains empty / truncated.

Additional information

Diagnostics

I captured terminal output with:

script -q -c "codex --no-alt-screen" /tmp/codex.tlog

Findings:

  • No alt-screen sequences (CSI ?1049h/?1047h/?47h not present)
  • No scrollback clear (CSI 3 J) and no terminal reset (ESC c)
  • Full-screen redraw patterns present (cursor addressing CSI row;col H, CSI J, CSI K, scroll regions CSI r, reverse index ESC M)
  • Synchronized output toggles (CSI ?2026 h/l) are present

This suggests --no-alt-screen keeps the full-screen TUI renderer, but just in the main buffer. Zellij doesn’t build scrollback from in-place redraws, so
there is still nothing to scroll.

Related

Possible direction

Add a true “inline / line-based output” mode (no cursor addressing / screen clears / scroll regions), or a config option that switches to a non-fullscreen renderer in Zellij.

Activity

  1. added
    bug
    on Feb 1, 2026
  2. added
    CLI
    TUI
    on Feb 1, 2026
  3. github-actions commented on Feb 1, 2026

    @github-actions
    Contributor

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

    Powered by Codex Action

  4. alphaben-ch commented on May 28, 2026

    @alphaben-ch

    Adding a version isolation datapoint for this Zellij scrolling regression:

    Codex CLI Zellij Scrolling Regression

    Summary

    Codex CLI mouse-wheel scrolling is broken inside Zellij panes in versions after 0.130.0.

    Other Zellij panes scroll normally, and Zellij scrollback itself works. The issue appears specific to Codex's TUI behavior.

    Environment

    • Zellij: 0.43.1
    • Terminal: TERM=xterm-256color
    • Session type: SSH
    • Install method: npm install -g @openai/codex
    • Shell: Bash
    • Host path: /opt/alphabench

    Relevant environment observed:

    ZELLIJ=0
    ZELLIJ_SESSION_NAME=exquisite-donkey
    TERM=xterm-256color
    SSH_TTY=/dev/pts/6
    

    Reproduction

    1. Start Zellij.
    2. Start Codex inside a Zellij pane.
    3. Produce enough Codex TUI output to require scrolling.
    4. Try to scroll with the mouse wheel.

    Expected: mouse-wheel scrolling works as it does in other Zellij panes.

    Actual: Codex pane does not scroll to earlier TUI output.

    Version Isolation

    Tested with clean Codex restarts after each install:

    @openai/[email protected]  works
    @openai/[email protected]  broken
    @openai/[email protected]  broken
    

    This suggests the regression was introduced after 0.130.0 and is present by 0.133.0.

    Attempted Config Workarounds

    The following Codex config options did not fix the issue:

    [tui]
    alternate_screen = "never"
    raw_output_mode = true

    They were removed after testing.

    Current Workaround

    Pin Codex CLI to 0.130.0:

    npm install -g @openai/[email protected]

    Then restart the Codex pane.

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

    CLITUIbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions