Skip to content

Codex CLI in an Eclipse IDE terminal doesn't allow backward scrolling (also with --no-alt-screen option) #2680

Open

Description

@stefano-1973

Codex CLI in an Eclipse IDE terminal window doesn't allow backward scrolling. Also, running Codex with the --no-alt-screen option doesn't change anything.
I know the Eclipse terminal is scrollable and Codex CLI running in Windows cmd or powershell is scrollable.
So there must be some problem between Codex CLI and Eclipse terminal.

Steps to reproduce

  • Open a terminal in eclipse IDE
  • Start Codex CLI with or without --no-alt-screen (even setting "set TERM=dumb" before calling codex doesn't help)
  • Give Codex the following prompt : write 50 rows (a enter b enter c etc...)
  • Try scrolling backward and see if it appears

Tested under this environment:

  • Windows Server 2019
  • Eclipse IDE/Platform version Version: 2026-03 (4.39.0) Build id: 20260305-0817
  • Codex Cli version 135

Workarounds

  1. Use the internal Codex transcript directrly in the Eclipse terminal running Codex TUI, activable with Ctrl+T
  2. Tricks Codex to think it's running inside Zwellij:
    For linux:
ZELLIJ=1 codex --no-alt-screen -c tui.raw_output_mode=true

For windows:

set ZELLIJ=1
codex --no-alt-screen -c tui.raw_output_mode=true

Activity

  1. changed the title [-]Codex CLI in an eclipse terminal dowsn't allow backward scrolling (also with --no-alt-screen option)[/-] [+]Codex CLI in an eclipse terminal doesn't allow backward scrolling (also with --no-alt-screen option)[/+] on May 31, 2026
  2. stefano-1973 commented on May 31, 2026

    @stefano-1973
    Author

    Because the cause is Codex Cli only when used with Eclipse terminal (and vice-versa), I open also this: openai/codex#25412

  3. merks commented on May 31, 2026

    @merks
    Contributor

    I would have extremely low expectations with respect to someone else doing something to fix whatever problem there might be here. Whomever wants this to work will most likely need to invest the effort needed to do whatever is necessary to make it work themselves.

  4. changed the title [-]Codex CLI in an eclipse terminal doesn't allow backward scrolling (also with --no-alt-screen option)[/-] [+]Codex CLI in an Eclipse IDE terminal doesn't allow backward scrolling (also with --no-alt-screen option)[/+] on May 31, 2026
  5. vogella commented on May 31, 2026

    @vogella
    Contributor

    @stefano-1973 What does Codex CLI say about a fix in this repo?

  6. vogella commented on May 31, 2026

    @vogella
    Contributor
  7. merks commented on May 31, 2026

    @merks
    Contributor

    eclipse-platform/eclipse.platform.swt#3350

    I guess you meant to link tab reordering to a different issue.

  8. stefano-1973 commented on Jun 1, 2026

    @stefano-1973
    Author

    The problem is present also if I start linux elipse in WSL2 ubuntu. Eclipse installed in wsl2 with "sudo snap install eclipse --classic"

  9. vogella commented on Jun 1, 2026

    @vogella
    Contributor

    @stefano-1973 I do not have the option to use Codex CLI (with --no-alt-screen).

    Can you enable a trace option so that we can see which sequence is send?

    To see what --no-alt-screen actually does, please capture a terminal trace:

    1. Create a file named .options beside eclipse.exe with this one line:

    org.eclipse.terminal.control/debug/log/char=true

    1. Start Eclipse from that folder with -debug (it reads .options from the current directory):

    eclipse.exe -debug

    1. In the Eclipse terminal, run codex --no-alt-screen, print 50 rows (a, b, c, ...), and try scrolling back.

    2. Attach the log from:

    .metadata.plugins\org.eclipse.terminal.control\tmterminal.log

    If it contains \x1b[?1049h, then --no-alt-screen did not take effect (also useful to know); if that sequence is absent, it's exactly the trace we need.

  10. stefano-1973 commented on Jun 1, 2026

    @stefano-1973
    Author

    Codex analisys

    Even with --no-alt-screen, Codex is still a raw-mode TUI application and does not emit output as simple line-by-line stdout. It uses terminal control sequences to redraw and insert history into the normal screen buffer. Eclipse Terminal may not be recording those screen-buffer updates into scrollback the same way other terminals do.

    So this could potentially be addressed either by:

    • Codex adding a fallback/raw output mode for Eclipse Terminal, similar to the Zellij raw path; or
    • Eclipse Terminal improving scrollback handling for raw-mode/fullscreen-style terminal applications that do not use the alternate screen buffer.
  11. vogella commented on Jun 1, 2026

    @vogella
    Contributor

    I have a patch ready which works for Claude CLI, only awaiting your input from the log.

  12. vogella commented on Jun 1, 2026

    @vogella
    Contributor

    Btw. I tried to suggest that you clone this repo and ask Codex to analyse what can be done in Eclipse to fix it. This is not necessary anymore as I already have a local patch.

    Maybe once I have published my patch, you can ask Codex for feedback.

  13. stefano-1973 commented on Jun 2, 2026

    @stefano-1973
    Author

    @stefano-1973 I do not have the option to use Codex CLI (with --no-alt-screen).

    Can you enable a trace option so that we can see which sequence is send?

    To see what --no-alt-screen actually does, please capture a terminal trace:

    1. Create a file named .options beside eclipse.exe with this one line:

    org.eclipse.terminal.control/debug/log/char=true

    1. Start Eclipse from that folder with -debug (it reads .options from the current directory):

    eclipse.exe -debug

    1. In the Eclipse terminal, run codex --no-alt-screen, print 50 rows (a, b, c, ...), and try scrolling back.
    2. Attach the log from:

    .metadata.plugins\org.eclipse.terminal.control\tmterminal.log

    If it contains \x1b[?1049h, then --no-alt-screen did not take effect (also useful to know); if that sequence is absent, it's exactly the trace we need.

    With eclipse in ubuntu/wsl2 (snap installation):

    $  more .options
    org.eclipse.terminal.control/debug/log/char=true
    $ eclipse -debug ~/.options > ~/eclipse_debug.log 2>&1
    

    in eclipse_debug.log I see only this:

    ...................................
    Debug options:
        file:.options loaded
    Time to load bundles: 3
    Jun 02, 2026 10:34:56 AM org.apache.aries.spifly.BaseActivator log
    INFO: Registered provider ch.qos.logback.classic.spi.LogbackServiceProvider of service org.slf4j.spi.SLF4JServiceProvider in bundle ch.qos.logback.classic
    10:35:01.574 [Start Level: Equinox Container: b2e9d576-aa82-407f-86eb-7c83d4b3be01] DEBUG org.eclipse.jgit.internal.util.ShutdownHook -- register org.eclipse.jgit.util.FS$FileStoreAttributes$$Lambda/0x0000796c0c225500@1c40cd22 with shutdown hook
    10:35:01.574 [Start Level: Equinox Container: b2e9d576-aa82-407f-86eb-7c83d4b3be01] DEBUG org.eclipse.jgit.internal.util.ShutdownHook -- register org.eclipse.jgit.util.FS$FileStoreAttributes$$Lambda/0x0000796c0c225500@1c40cd22 with shutdown hook
    Starting application: 643
    

    P.S.: the scrollbar doesn't appear

    Image

    In tmterminal.log i see:

    tmterminal.log

  14. 5 remaining items

  15. vogella commented on Jun 2, 2026

    @vogella
    Contributor

    Ah, sorry did not see that. Thanks

  16. vogella commented on Jun 3, 2026

    @vogella
    Contributor

    Did you try to use your mouse wheel during the test in the console? The log does not seem to contain mouse events.

  17. stefano-1973 commented on Jun 3, 2026

    @stefano-1973
    Author

    Did you try to use your mouse wheel during the test in the console? The log does not seem to contain mouse events.

    As you can see here, the right scrollbar doesn't even appear: the scrollback memory of the eclipse terminal is completly empty. So no need to scrollback with the mouse wheel.

    Image
  18. vogella commented on Jun 3, 2026

    @vogella
    Contributor

    Please use the mouse wheel and upload the trace. If possible I want also support mouse scrolling.

  19. stefano-1973 commented on Jun 4, 2026

    @stefano-1973
    Author

    Please use the mouse wheel and upload the trace. If possible I want also support mouse scrolling.

    When I use/scroll the mouse wheel, nothing is added to the tmterminal.log. The wheel movement make the windows scroll in the correct way BUT are not shown the old rows previously printed by codex but the rows in the scroll buffer that was present before I start codex:

    Image

    If previous rows written by codex was correctly scrolled, in my image you would have seen 12, 11, 10......
    So I imagine that the old no more visible rows printed by codex are not saved/put in the scroll buffer of the eclipse terminal.

    Codex CLI uses terminal control sequences to redraw and insert history into the normal screen buffer. Eclipse Terminal may not be recording those screen-buffer updates into scrollback the same way other terminals do

  20. vogella commented on Jun 11, 2026

    @vogella
    Contributor

    stefano-1973 can you test PR #2764?

  21. stefano-1973 commented on Jun 27, 2026

    @stefano-1973
    Author

    stefano-1973 can you test PR #2764?

    I've tested it. It seems to scroll correctly

    Image
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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions