Skip to content

Codex App: Terminal panel flashes briefly then disappears on macOS #29090

Open

Description

@tomaskraina

What version of the Codex App are you using (From "About Codex" dialog)?

26.616.32156 (4157)

Bundled Codex CLI:
codex-cli 0.142.0-alpha.1

What subscription do you have?

Personal Pro Plan

What platform is your computer?

macOS 26.5.1, build 25F80

Shell: zsh

What issue are you seeing?

In the Codex App on macOS, the integrated terminal cannot be toggled open. When I try to show the terminal, it appears for a fraction of a second and then immediately disappears again.

This makes the integrated terminal unusable from the app. It happens with the bottom panel, as well as when trying to show the terminal in side panel.

This may be related to, but appears distinct from, #21377. That issue reports the terminal toolbar button disappearing while Cmd+J still works. In this case, the terminal panel briefly flashes and then closes/disappears, so toggling does not leave a usable terminal visible.

What steps can reproduce the bug?

  1. Open Codex App on macOS.
  2. Open a project/thread.
  3. Try to toggle the integrated terminal using Cmd+J or the Toggle bottom panel toolbar item.
  4. Observe that the terminal appears only momentarily, then disappears.

What is the expected behavior?

The integrated terminal should remain visible after toggling it open, until I explicitly hide it again.

Additional information

Feedback ID 019edfef-ed9d-7b51-95e5-7e484656a8b2

Activity

  1. added
    bug
    app
    on Jun 19, 2026
  2. github-actions commented on Jun 19, 2026

    @github-actions
    Contributor
  3. dsfaccini commented on Jul 22, 2026

    @dsfaccini

    This comment was posted by Codex Desktop using gpt-5.6-terra on behalf of David.

    Also affecting us on macOS.

    After forking a Codex conversation and choosing to continue in a worktree, opening the terminal fails in both UI paths:

    • Toggle bottom panel: the panel starts to open, then immediately closes.
    • Side-panel menu → Terminal: the side panel immediately closes without showing a terminal.

    The integrated terminal is therefore unusable in that worktree-backed conversation.

  4. mcdpconsulting-hub commented on Aug 28, 2026

    @mcdpconsulting-hub

    Possible root cause + confirmed fix on my machine

    Reported by Mauro Cruz

    I was affected by this exact issue on macOS: the Codex integrated terminal would open for a fraction of a second and immediately close, both from the bottom panel and the side panel.

    I found that, a few days earlier, I had installed Xcode but had not accepted the Xcode license agreement on macOS.

    After accepting the Xcode license, the issue was resolved: the Codex integrated terminal now opens normally and stays open without any problems.

    So, at least in my case, the sequence was:

    1. Install Xcode on macOS.
    2. Leave the Xcode license agreement unaccepted.
    3. Open Codex and try to open the integrated terminal → it flashes briefly and closes immediately.
    4. Accept the Xcode license agreement.
    5. Open the Codex terminal again → terminal works normally.

    This suggests Codex may be starting or depending on a developer/command-line process that fails when the Xcode license is still pending, with the UI currently handling that failure by simply closing the terminal panel.

    It may be worth detecting this condition and showing an actionable error such as “Xcode license agreement must be accepted” instead of silently closing the terminal.

    If anyone else affected by this issue recently installed or updated Xcode, it would be useful to confirm whether accepting the license fixes it for them as well.

    Credit: Mauro Cruz — identified the cause and workaround on his macOS setup. If OpenAI has any contributor recognition or applicable bug/research reward program for fixes like this, I’d appreciate attribution/consideration.

  5. dsfaccini commented on Aug 29, 2026

    @dsfaccini

    I've developed stuff using xcode so I'm sure I've accepted the license agreement, in my case it seemed like a bug related to the worktree creation and handling

  6. lullu57 commented on Aug 30, 2026

    @lullu57

    Still reproducible on a newer macOS desktop build.

    Environment:

    • Codex Desktop 26.825.41651 (build 7345)
    • Bundled CLI 0.151.0-alpha.7.1
    • macOS 26.6.2 (25G83), Apple Silicon
    • Login shell /bin/zsh
    • Local project task

    Observed behavior:

    1. Open a local project task.
    2. Try to open the integrated terminal from the toolbar or shortcut.
    3. No usable terminal remains attached to the task.
    4. Agent-side terminal inspection reports a blank working directory, shell: unknown, and no output.
    5. Requests to open a terminal are accepted by app-server but remain queued rather than creating a visible shell.

    Recovery checks:

    • Fully quit and reopened the app; issue persisted.
    • Verified /bin/zsh starts normally in the same repository outside the panel.
    • Verified the configured user shell is /bin/zsh.
    • Desktop logs show successful terminal-related app-server request responses, without a shell being attached.
    • As a reversible diagnostic, disabled the experimental terminal_resize_reflow feature and preserved the original config. A full app restart is being used to determine whether that flag affects the failure.

    This appears to be the same terminal panel lifecycle problem, with the additional symptom that app-server reports no attached shell. Raw logs and task identifiers are omitted because the project is private; sanitized excerpts can be provided.

  7. lullu57 commented on Aug 30, 2026

    @lullu57

    Follow-up: after a full app restart with the experimental terminal_resize_reflow feature disabled, the terminal panel still did not open or attach a shell. The original configuration has been restored. This rules out that feature flag as a workaround on Desktop 26.825.41651 (build 7345).

  8. hheei commented on Sep 1, 2026

    @hheei

    Still reproducible on a newer macOS Desktop build.

    Environment

    • ChatGPT/Codex Desktop 26.831.11858 (build 7504)
    • Bundled Codex CLI 0.152.0
    • macOS 26.6.2, Apple silicon
    • Local project and projectless tasks; /bin/zsh

    Reproduction

    1. Open any local task, including a newly created local task.
    2. Select Open Terminal.
    3. No terminal panel or session is created. The same happens from every local thread.

    Checks already performed

    • Fully quit and restarted the app; reinstalled the app.
    • Verified /bin/zsh starts normally outside the panel.
    • Local app-server and code-mode host are running.
    • Removed a stale remote connection and restarted; the problem remains.
    • No terminal session is attached to the thread, and no terminal/PTY startup error is recorded.

    The renderer records the following warning immediately after an attempted open:
    Matched leaf route at location "/" does not have an element or Component ... resulting in an "empty" page.

    This appears consistent with the local-thread terminal routing/session-ownership failure described in #37104. Sanitized diagnostics are available if useful.

  9. lucianogiannini commented on Sep 16, 2026

    @lucianogiannini

    Hey yall,

    I have been experiencing the same issues as you all. Nothing above worked. Terminal will open and then close immediately. I had Codex (Astra) within a project investigate.

    This was my chat and work done.

    My message:

    it seems to still be doing it after restart. can you try to open terminal in codex again and check local Codex logs for a concrete PTY/session errors.
    Can you continue looking and checking things to do to fix this? Even if you need to go into the codex bundle or something please i want the integrated terminal to work

    Codex Response:

    I’ll inspect how the installed app creates terminal sessions and compare that with its logs. The earlier explanations went beyond the evidence: we’ve confirmed the panel fails, but haven’t established why.

    Edited files, read files, ran commands

    I found another clue: the app logged spawn tar ENOENT, meaning it couldn’t locate tar, and it also reported Git unavailable. I’m checking the app’s environment and shell startup files to see whether these failures share a cause.

    Loaded a tool, read files, ran commands

    I’ve reproduced a concrete configuration problem: line 25 of your .zshrc inserts the error output from npm bin -g into PATH. The environment inherited by Codex is cut off at that error, leaving out /usr/bin and /bin; command lookup fails there, while absolute paths work.
    I’ll back up the file and remove that obsolete line, then test a fresh shell. This is a strong lead, but the integrated terminal will still need verification after the app reloads its environment.

    Edited a file, ran commands, opened terminal, read terminal

    The shell-file fix passes testing: a fresh login shell now has a clean PATH and can find git, tar, and zsh. Your original .zshrc is backed up.
    The running app still has its old environment, and another terminal-open attempt hasn’t attached a session. I’m checking the bundle’s environment-loading code before asking you to restart, so we know what the restart should change.

    I found and fixed a concrete problem in your .zshrc: an obsolete npm bin -g command was inserting multiline error text into PATH.

    The app bundle confirms Codex reads that environment line by line, truncating PATH before essential system directories. That explains the “Git unavailable” and “tar not found” errors.

    I removed that line, backed up the original, and verified fresh shells can find git, tar, and zsh. No app-bundle changes were needed.

    Please fully quit the app with ⌘Q, then reopen it and try the integrated terminal. The running app still holds the broken environment; reopening the panel alone won’t refresh it.

    I haven’t confirmed the integrated terminal works yet. After restarting, reply here and I’ll check its session and fresh logs.

    This looked to be the main issue "I found and fixed a concrete problem in your .zshrc: an obsolete npm bin -g command was inserting multiline error text into PATH."

    Hopefully this helps someone out there!!

  10. qg-hs commented on Sep 18, 2026

    @qg-hs

    I can reproduce the same issue on a newer macOS / ChatGPT Desktop build.

    Environment

    • Device: Mac with Apple M1
    • Architecture: Apple Silicon / arm64
    • OS: macOS 27
    • ChatGPT Desktop: 26.915.31029
    • About dialog: "Powered by Codex & OWL"
    • Release date shown in the app: Sep 18, 2026

    Behavior

    After upgrading to macOS 27, the integrated terminal at the bottom of the ChatGPT/Codex desktop app can no longer stay open.

    When I click the bottom terminal control, the terminal panel appears briefly and then immediately closes/disappears again.

    This happens consistently and makes the integrated terminal unusable.

    Expected

    The terminal panel should remain open until I explicitly close it.

    Additional information

    I have a screen recording/GIF showing the issue and can provide it if useful.

    This appears to be the same symptom described in this issue, but it is still reproducible on macOS 27 with ChatGPT Desktop 26.915.31029.

  11. qg-hs commented on Sep 18, 2026

    @qg-hs

    I can reproduce this issue as well after upgrading to macOS 27.

    Environment

    • Device: Mac with Apple M1
    • Architecture: Apple Silicon / arm64
    • OS: macOS 27
    • ChatGPT desktop app: 26.915.31029
    • About dialog: "Powered by Codex & OWL"
    • Release date shown in the app: Sep 18, 2026

    Behavior

    When I click the integrated terminal / bottom panel, it appears briefly and then immediately closes again, making the terminal unusable.

    This started after upgrading the Mac to macOS 27.

    I also have a screen recording (GIF) showing the terminal flashing open and closing immediately.
    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

    appbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions