使用 launch_codex_unpacked.sh 启动未打包的 Codex Desktop 构建,可选开启调试端口和 SSH 主机自动启动。用于在外部请求运行 Codex 时。
Use this skill when the task is to run Codex Desktop from unpacked app.asar with controlled debug settings.
./launch_codex_unpacked.shRun these checks before launch:
bash
test -x ./launch_codex_unpacked.sh
test -d /Applications/Codex.app
Tooling note:
node/ npx via Homebrew by default.AUTO_INSTALL_TOOLS=0 to disable auto-install behavior.If a custom app path is provided, verify it contains:
<APP_PATH>/Contents/Resources/app.asar<APP_PATH>/Contents/Resources/codexDefault launch (inspect + remote debugging enabled):
bash
./launch_codex_unpacked.sh
Custom ports:
bash
./launch_codex_unpacked.sh --inspect-port 9330 --remote-debug-port 9333
Disable one or both debug channels:
bash
./launch_codex_unpacked.sh --no-inspect
./launch_codex_unpacked.sh --no-remote-debug
Launch against a different Codex.app:
bash
./launch_codex_unpacked.sh --app "/Applications/Codex.app"
Preserve extracted temp app for analysis:
bash
./launch_codex_unpacked.sh --keep-temp
Use a fixed Chromium profile/user data directory:
bash
./launch_codex_unpacked.sh --user-data-dir "/tmp/codex-user-data"
SSH host autostart mode:
bash
./launch_codex_unpacked.sh --ssh-host "user@host"
What SSH mode does:
BatchMode + timeout).~/.codex/.codex-global-state.json ( electron-ssh-hosts).Append app arguments after --:
bash
./launch_codex_unpacked.sh -- --some-codex-flag value
After launch, report:
App dir pathUser data dir pathCommand lineSSH host mode was enabledMissing app.asar or Missing codex binary: wrong --app path.SSH autostart patch anchor not found: Codex bundle changed; script patch target must be updated.