Skip to content

fix: support Codex Desktop hosted by ChatGPT#267

Open
Haoo-7 wants to merge 1 commit into
wxtsky:mainfrom
Haoo-7:fix/codex-chatgpt-desktop-status
Open

fix: support Codex Desktop hosted by ChatGPT#267
Haoo-7 wants to merge 1 commit into
wxtsky:mainfrom
Haoo-7:fix/codex-chatgpt-desktop-status

Conversation

@Haoo-7

@Haoo-7 Haoo-7 commented Jul 19, 2026

Copy link
Copy Markdown

Summary

  • Recognize Codex Desktop when its executable is hosted by ChatGPT.app.
  • Discover project cwd and session metadata from Codex rollout transcripts when the shared app-server cwd is /.
  • Ignore empty/root-cwd placeholder hooks that would overwrite a real discovered session.
  • Parse Codex JSONL task_started, task_complete, turn_aborted, and turn_failed events into CodeIsland running/idle state.
  • Treat Codex event messages as activity heartbeats so long turns are not reset to idle by the timeout watchdog.

Background

Codex has recently been integrated into ChatGPT as a multi-purpose host application. On macOS, the Codex executable can now run from:

/Applications/ChatGPT.app/Contents/Resources/codex

The shared app-server commonly reports / as its cwd, while the actual project cwd is stored in the rollout transcript metadata. Some desktop invocations also emit empty or root-cwd hook payloads.

The previous CodeIsland integration assumed the older standalone Codex.app layout and relied on hook/message parsing for live status, so sessions could be discovered but remained idle.

Test Plan

  • swift build -c release --arch arm64 passes.
  • Added JSONL parser coverage for Codex turn lifecycle events, latest turn recovery, and activity heartbeats.
  • Added discovery coverage for ChatGPT.app executable paths, large session metadata, transcript cwd recovery, and placeholder hooks.
  • swift test could not run on the development machine because the active Command Line Tools installation has no XCTest module; the test targets report this environment error. CI with a full Xcode toolchain should run the test suite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant