2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Windows版Codexアプリが起動時のロゴ画面から進まない(26.924〜26.928)ときはapp-serverを終了すると開く

2
Posted at

2026-09-30 時点の情報です。 OpenAI 側の不具合なので、修正版が出れば以下の手順はいらなくなります。使う前に、下の Issue が閉じていないかを確認してください。
openai/codex#49240

結論

Windows 版の Codex デスクトップアプリが、起動するとロゴとくるくる回る読み込み表示のまま、10分待っても進まなくなりました。

  • PC の再起動、アプリの再インストール、設定ファイルの作り直しでは直りません。
  • ロゴが出ている間に、裏で動いている codex.exe(app-server)を終了すると、数秒でホーム画面が出ます。
  • 修正版が出るまでは、起動のたびにこの操作が必要です。自分は PowerShell スクリプトにして、ショートカットから起動するようにしました(後半に全文を載せています)。

日本語で検索しても、別の症状(エラーコードが出る、VC++ ランタイムが無い、など)の記事しか見つからなかったので、書き残しておきます。

環境

項目 値
OS Windows 11 Pro(10.0.26200)
Codex アプリ Microsoft Store 版 OpenAI.Codex 26.928.1915.0(アプリ内の表記は 26.928.20755)
発生時期 2026-09-30 の朝から

GitHub の報告を見ると、9/27 ごろに配信された 26.924 から出始めて、26.928 でも直っていないようです。Windows 10 と 11 の両方で報告されています。

症状

  • アプリを起動すると白いウィンドウの中央に OpenAI のロゴが出て、そこから先に進みません。
  • エラーのダイアログは出ません。
  • Codex CLI(ターミナルで使う codex exec など)は普通に動きます。止まるのはデスクトップアプリだけです。

同じ症状かどうかをログで確かめる

アプリは2種類のプロセスで動いています。

プロセス 役割
ChatGPT.exe 画面を描く側(Electron)
codex.exe ... app-server 裏の本体。設定の読み込み、スレッドの管理、モデルとの通信を受け持つ

画面を描く側のログは次の場所にあります。

%LOCALAPPDATA%\Packages\OpenAI.Codex_2p2nqsd0c76g0\LocalCache\Local\Codex\Logs\<年>\<月>\<日>\codex-desktop-*-t0-*.log

正常に起動した場合は、ログに次の行が出ます。

[startup][renderer] app routes mounted after XXXXms

止まっているときは、この行が出ません。一方で、config/read(設定の読み込み)や thread/list(スレッド一覧)といった裏の本体への問い合わせには、すべて応答が返っていました。裏の本体は元気なのに、画面を描く側が先へ進まない、という状態です。

試して効かなかったこと

どれも効きませんでした。自分と同じ順番で試すと時間を無駄にするので、先に書いておきます。

試したこと 結果
PC の再起動 変わらず
アプリの再インストール 変わらず。~/.codex 配下は再インストールでは消えないので、設定が原因の場合はこれでは直らない
~/.codex/.codex-global-state.json(画面の状態を保存するファイル)を退避して作り直させる 変わらず。このファイルは 693KB に膨らんでいて怪しかったが、無関係だった
config.toml で、同梱ツール codex-app-tools を無効にする 変わらず。起動のたびに出ていたツールのタイムアウト警告は消えたが、ロゴのまま

あとで GitHub の Issue を読んだら、新しい CODEX_HOME(設定フォルダ)で起動しても、2回目以降はやはり止まると報告されていました。設定やデータを触っても直らない、という自分の結果と一致します。

原因

OpenAI 側の既知の不具合です。公式リポジトリに同じ症状の Issue が9件以上立っています(末尾の参考リンクを参照)。

報告者の見立ては次のとおりです。

  • 起動時に、画面を描く側から裏の本体へ送る問い合わせのうち、1件の応答が画面を描く側に届かないらしい。
  • 裏の本体を起動し直すと、その問い合わせが送り直されて画面が出る。

「1件の応答が届かない」の部分は報告者の推測で、OpenAI からの説明はまだありません。

回避策(手動)

ロゴが出て止まったら、裏の本体 codex.exe app-server だけを終了します。やり方は2つあります。

タスクマネージャーを使う

  1. タスクマネージャーを開き、「ChatGPT」のグループを展開する。
  2. 子プロセスの Codex を終了する。

同じ名前の Codex が2つ並んでいることがあります。自分の環境では、app-server のほうが先に起動していて、もう一方は exec-server でした。どちらか分からなければ、次の PowerShell を使うほうが確実です。

PowerShell を使う

Get-CimInstance Win32_Process |
  Where-Object { $_.Name -eq "codex.exe" -and $_.CommandLine -like "* app-server *" } |
  ForEach-Object { Stop-Process -Id $_.ProcessId -Force }

コマンドラインに app-server を含む codex.exe だけを終了します。アプリはこれを検知して本体を起動し直します。自分の環境では、終了してから約9秒でホーム画面が出ました。

回避策を自動にする

毎回タスクマネージャーを開くのが面倒になったので、スクリプトにしました。やっていることは次のとおりです。

  1. Codex がすでに起動していれば、ウィンドウを前面に出すだけで終わる。
  2. 起動していなければアプリを起動し、app-server が立ち上がるまで最大60秒待つ。
  3. そこから25秒以内にログへ app routes mounted が出れば、何もせず終わる。正常に起動したときはここで終わるので、修正版が出たあとに使っても害はありません。
  4. 出なければ app-server を終了し、app routes mounted を最大40秒待つ。それでも出なければ、もう1回だけ同じことをする。

自分の環境では、起動からホーム画面が出るまで約40秒でした。その間はロゴが出たままです。

スクリプト本体

%USERPROFILE%\Scripts\CodexLauncher\Start-CodexApp.ps1 として保存します(場所は好みで変えてください)。スクリプトは英数字だけで書いてあるので、文字コードは気にしなくて大丈夫です。

Start-CodexApp.ps1
# Start-CodexApp.ps1
# Launches the Codex desktop app (Windows) and works around the startup-spinner hang
# (openai/codex#49240): if the renderer never logs "app routes mounted", the bundled
# app-server (codex.exe ... app-server) is stopped so the app restarts it and the UI loads.
# Remove this launcher once an app update fixes the upstream issue.

$ErrorActionPreference = 'Continue'

$AppId        = 'OpenAI.Codex_2p2nqsd0c76g0!App'
$LogRoot      = Join-Path $env:LOCALAPPDATA 'Packages\OpenAI.Codex_2p2nqsd0c76g0\LocalCache\Local\Codex\Logs'
$MountedText  = 'app routes mounted'
$GraceSec     = 25    # wait this long after app-server starts before assuming a hang
$RecoverSec   = 40    # wait this long for the UI after stopping app-server
$MaxAttempts  = 2
$LauncherLog  = Join-Path $PSScriptRoot 'Start-CodexApp.log'

function Write-Log([string]$msg) {
    $line = '{0:yyyy-MM-dd HH:mm:ss} {1}' -f (Get-Date), $msg
    try { Add-Content -Path $LauncherLog -Value $line -Encoding UTF8 } catch {}
}

function Get-CodexUiProcess {
    Get-Process -Name ChatGPT -ErrorAction SilentlyContinue |
        Where-Object { $_.Path -like '*\WindowsApps\OpenAI.Codex_*' }
}

function Get-AppServer([datetime]$since) {
    Get-CimInstance Win32_Process -Filter "Name='codex.exe'" -ErrorAction SilentlyContinue |
        Where-Object { $_.CommandLine -like '* app-server *' -and $_.CreationDate -ge $since }
}

function Test-Mounted([datetime]$since) {
    if (-not (Test-Path $LogRoot)) { return $false }
    $logs = Get-ChildItem -Path $LogRoot -Recurse -Filter 'codex-desktop-*-t0-*.log' -ErrorAction SilentlyContinue |
        Where-Object { $_.LastWriteTime -ge $since }
    foreach ($f in $logs) {
        if (Select-String -Path $f.FullName -SimpleMatch $MountedText -Quiet) { return $true }
    }
    return $false
}

function Wait-Until([scriptblock]$cond, [int]$timeoutSec) {
    $deadline = (Get-Date).AddSeconds($timeoutSec)
    while ((Get-Date) -lt $deadline) {
        if (& $cond) { return $true }
        Start-Sleep -Seconds 1
    }
    return $false
}

# App already running: just bring it to the front.
if (Get-CodexUiProcess) {
    Write-Log 'already running; activating window'
    Start-Process "shell:AppsFolder\$AppId"
    exit 0
}

$start = (Get-Date).AddSeconds(-2)
Write-Log 'launching Codex app'
Start-Process "shell:AppsFolder\$AppId"

# Wait for the app-server to come up.
if (-not (Wait-Until { [bool](Get-AppServer $start) } 60)) {
    Write-Log 'app-server did not start within 60s; giving up'
    exit 1
}

if (Wait-Until { Test-Mounted $start } $GraceSec) {
    Write-Log 'UI mounted normally'
    exit 0
}

for ($i = 1; $i -le $MaxAttempts; $i++) {
    $servers = @(Get-AppServer $start)
    if ($servers.Count -eq 0) { Write-Log 'no app-server process found'; exit 1 }
    foreach ($s in $servers) {
        Write-Log ("attempt {0}: stopping app-server pid {1}" -f $i, $s.ProcessId)
        Stop-Process -Id $s.ProcessId -Force -ErrorAction SilentlyContinue
    }
    if (Wait-Until { Test-Mounted $start } $RecoverSec) {
        Write-Log ("UI mounted after workaround (attempt {0})" -f $i)
        exit 0
    }
}

Write-Log 'UI still not mounted after workaround'
exit 1

OpenAI.Codex_2p2nqsd0c76g0 は Store 版のパッケージ名なので、誰の環境でも同じはずです。念のため、自分の環境の値は次のコマンドで確かめられます。

Get-StartApps | Where-Object { $_.AppID -like 'OpenAI.Codex*' }

デスクトップにショートカットを作る

PowerShell の黒い画面を出さずに起動するためのショートカットです。アイコンはアプリから複製しておきます。アプリの更新でインストール先のフォルダ名が変わっても、アイコンが消えないようにするためです。

$dir = "$env:USERPROFILE\Scripts\CodexLauncher"
$pkg = Get-AppxPackage OpenAI.Codex
Copy-Item "$($pkg.InstallLocation)\app\resources\icon-chatgpt.ico" "$dir\codex.ico"

$ws  = New-Object -ComObject WScript.Shell
$lnk = $ws.CreateShortcut("$([Environment]::GetFolderPath('Desktop'))\Codex (workaround).lnk")
$lnk.TargetPath       = "$env:WINDIR\System32\WindowsPowerShell\v1.0\powershell.exe"
$lnk.Arguments        = "-NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden -File `"$dir\Start-CodexApp.ps1`""
$lnk.WorkingDirectory = $dir
$lnk.IconLocation     = "$dir\codex.ico"
$lnk.WindowStyle      = 7
$lnk.Save()

あとはデスクトップの Codex (workaround) から起動します。タスクバーに置きたい場合は、ショートカットを右クリックしてピン留めしてください。

実行結果

同じフォルダの Start-CodexApp.log に、起動のたびに1行ずつ結果が追記されます。自分の環境で実際に動かしたときのログです。

2026-09-30 11:30:53 launching Codex app
2026-09-30 11:31:25 attempt 1: stopping app-server pid 23632
2026-09-30 11:31:33 UI mounted after workaround (attempt 1)

注意点

  • プロセスを強制終了する、非公式の回避策です。自己責任で使ってください。
  • アプリで作業中にスクリプトを実行しても、起動中なら前面に出すだけで何も終了しません。ただ、手動で app-server を終了すると、実行中の処理は止まります。
  • 修正版が出たら、ショートカットと CodexLauncher フォルダを消してください。

参考リンク

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?