Skip to content

Linux desktop relaunch request is lost while the previous process is shutting down #63044

Closed as duplicate

Description

@neverblued

Consolidated into #62722. Linux-specific evidence has been added to the existing issue. The shutdown/relaunch timing matches; a shared internal root cause across Windows and Linux has not yet been established. Closing this report as a duplicate to keep the investigation together.


Closing ChatGPT and reopening it immediately from the KDE panel requires two launches.
The first process forwards the request to the old, shutting-down instance and exits; the old instance then exits without leaving a usable window.
The second launch starts normally.

Environment

  • ChatGPT Linux desktop .deb package: 26.1106.51428 (installed package and packaged application metadata; not a separately collected About-dialog value).
  • Ubuntu 24.04.5 LTS, x86_64; KDE Plasma workspace 5.27.12, KWin X11 5.27.11.
  • Packaged Chromium runtime: 157.0.8103.51.
  • Stock desktop entry: Exec=chatgpt %U; /usr/bin/chatgpt executes /usr/lib/chatgpt/ChatGPT.
  • Also reproduced while signed out in a fresh isolated application profile and a fresh CODEX_HOME; no subscription, model call, restored conversation or login-autostart helper was needed for that reproduction.

Steps to reproduce

  1. Start the Linux desktop app normally.
  2. Fully quit it using the tray menu's Quit command.
    Closing a window into the tray is a different case.
  3. Launch it again through the stock desktop entry or /usr/bin/chatgpt while the previous process is still shutting down.
    The affected real session had a shutdown window of about five seconds.
  4. Observe the brief launch indication disappear without a persistent app window.
    The new process prints Opening in existing browser session. and exits with status 0.
  5. After the previous process exits, launch again: the app opens normally.

For a controlled comparison, the same behavior was reproduced with --user-data-dir and CODEX_ELECTRON_USER_DATA_PATH pointing to a temporary profile, and CODEX_HOME and XDG_CONFIG_HOME pointing to separate temporary directories.
The stock launcher was invoked approximately 150 ms after the isolated instance's own tray Quit action; it exited successfully after forwarding, and no replacement main process remained after shutdown.
The fresh profile's shutdown interval was shorter than the real session's interval.

Expected behavior

One launch should eventually show the app, including when an earlier instance is still shutting down.
A successful forwarding acknowledgement should not discard the user's launch request.

Observed journal evidence

Selected events from 2026-11-21, in UTC; device names, personal paths and conversation identifiers are omitted.
Process identities are represented by roles.

20:56:59.489 [old]   Local Work executor ... event=lifecycle_stop ... reason=disposed
20:56:59.491 [old]   Stopping app-server transport connectionId=1 transport=stdio
20:57:01.541         Started app-chatgpt-<first>.scope
20:57:01.606 [first] Opening in existing browser session.
20:57:04.541         Old main-process scope finishes
20:57:06.301         Started app-chatgpt-<second>.scope
20:57:08.849 [second] Launching app ... platform=linux packaged=true

A second real-session pair on 2026-11-20 showed the same ordering: first forwarding at 13:50:32.982Z, old main-process scope finishing at 13:50:35.085Z, and the next launch starting at 13:50:37.643Z.
The user reports this consistently when closing and quickly reopening the app.

Investigation and workaround

The evidence supports a lifecycle race: single-instance forwarding accepts a request after shutdown has started, and the new launcher treats that acknowledgement as success even though the old instance is exiting.
The exact native forwarding implementation has not been instrumented.

A local launcher workaround checks the profile owner's process identity, tray and normal window state.
If that owner is exiting, it waits for the actual process exit before starting the app; if shutdown races with forwarding, it retries after that exact owner exits.
It does not kill processes, delete profile locks or impose a fixed startup delay.

On the installed package, three consecutive isolated quit-and-reopen cycles succeeded from one invocation with the workaround.
Cold launch, reopening from the tray and activation of an already visible window also passed.
The unmodified stock-launcher reproduction was performed before installing the user desktop-entry override.

Please investigate launch forwarding during shutdown and add regression coverage for immediate relaunch, hidden-to-tray activation and normal cold start.

Activity

  1. added
    bug
    app
    on Nov 21, 2026
  2. github-actions commented on Nov 21, 2026

    @github-actions
    Contributor

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

    Powered by Codex Action

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

    Linuxappbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions