You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Codex App: Terminal panel flashes briefly then disappears on macOS #29090
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?
Open Codex App on macOS.
Open a project/thread.
Try to toggle the integrated terminal using Cmd+J or the Toggle bottom panel toolbar item.
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.
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:
Install Xcode on macOS.
Leave the Xcode license agreement unaccepted.
Open Codex and try to open the integrated terminal → it flashes briefly and closes immediately.
Accept the Xcode license agreement.
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.
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
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:
Open a local project task.
Try to open the integrated terminal from the toolbar or shortcut.
No usable terminal remains attached to the task.
Agent-side terminal inspection reports a blank working directory, shell: unknown, and no output.
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.
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).
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
Open any local task, including a newly created local task.
Select Open Terminal.
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.
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."
Activity
github-actions commentedon Jun 19, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
dsfaccini commentedon Jul 22, 2026
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:
The integrated terminal is therefore unusable in that worktree-backed conversation.
mcdpconsulting-hub commentedon Aug 28, 2026
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:
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.
dsfaccini commentedon Aug 29, 2026
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
lullu57 commentedon Aug 30, 2026
Still reproducible on a newer macOS desktop build.
Environment:
26.825.41651(build7345)0.151.0-alpha.7.126.6.2(25G83), Apple Silicon/bin/zshObserved behavior:
shell: unknown, and no output.Recovery checks:
/bin/zshstarts normally in the same repository outside the panel./bin/zsh.terminal_resize_reflowfeature 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.
lullu57 commentedon Aug 30, 2026
Follow-up: after a full app restart with the experimental
terminal_resize_reflowfeature 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).hheei commentedon Sep 1, 2026
Still reproducible on a newer macOS Desktop build.
Environment
Reproduction
Checks already performed
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.
lucianogiannini commentedon Sep 16, 2026
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:
Codex Response:
This looked to be the main issue "I found and fixed a concrete problem in your .zshrc: an obsolete
npm bin -gcommand was inserting multiline error text intoPATH."Hopefully this helps someone out there!!
qg-hs commentedon Sep 18, 2026
I can reproduce the same issue on a newer macOS / ChatGPT Desktop build.
Environment
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.
qg-hs commentedon Sep 18, 2026
I can reproduce this issue as well after upgrading to macOS 27.
Environment
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.
