Skip to content

Scrollback in Zellij Pane Broken for OpenCode, But Works for Claude Code #3020

Closed

Description

@endlessblink

Describe the bug

When running AI code assistants in Zellij (e.g., Codex, OpenCode, Claude Code, etc), I’m unable to scroll up and down in the scrollback buffer when using OpenCode. However, this works correctly for Claude Code’s terminal output. In OpenCode sessions, attempting to scroll does not reveal previous output as expected. Claude Code does allow full Zellij scrollback, so the bug is likely due to differences in how OpenCode manages terminal output or buffer modes.

Steps to reproduce

Launch Zellij. Open a pane and start OpenCode (with output heavy commands).
Attempt to scroll back using Zellij’s scroll/copy mode or the mouse.
Repeat with Claude Code in a separate pane for comparison.

Expected behavior

Output from both apps should be scrollable in Zellij’s scrollback buffer using the standard scroll/copy mode, PgUp/PgDn, and mouse wheel.
Actual behavior
OpenCode output is not accessible in scrollback; scrolling fails or is incomplete.
Claude Code output is fully accessible in the scrollback buffer.

Environment

OS: WSL 2 on Windows 11
Zellij Version: zellij 0.42.2

Additional Context

This issue affects productivity when using Zellij with OpenCode. It occurs even after enabling mouse mode in Zellij and using scroll/copy shortcuts. Suspect this may be related to use of alternate screen buffer or specific terminal escape sequences in OpenCode.

Activity

  1. github-actions commented on Oct 7, 2025

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  2. rekram1-node commented on Oct 7, 2025

    @rekram1-node
    Collaborator

    believe this is because opencode is a tui and claude code isn't

  3. rekram1-node commented on Oct 7, 2025

    @rekram1-node
    Collaborator

    You can read more about this in #106 (comment) but I am going to close this because it isn't a bug.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions