Skip to content

fix: Jump to the correct Codex desktop thread - #387

Merged
wxtsky merged 2 commits into
wxtsky:mainfrom
ljt990218:codex/codex-desktop-thread-jump
Oct 28, 2026
Merged

wxtsky merged 2 commits into
wxtsky:mainfrom
ljt990218:codex/codex-desktop-thread-jump

Conversation

@ljt990218

Copy link
Copy Markdown
Contributor

Summary

Clicking a Codex Desktop session currently activates an application window using the project directory, which cannot select a specific conversation. Open codex://threads/<thread ID> through macOS so Codex can navigate to the selected thread and restore its minimized window.

Implementation

  • Apply the deep link only when the Codex bundle ID matches and the session satisfies the existing isNativeAppMode check.
  • Use the raw thread UUID stored in providerSessionId. Card IDs use the internal codexapp: prefix and are not passed to Codex. The provider ID is populated by app-server events, discovery and hooks, and retained across persistence.
  • Keep the existing application/window activation as the fallback when the provider ID is missing or invalid, or macOS explicitly rejects opening the URL.
  • Preserve jump notifications, reminder handling, auto-collapse preferences and visibility feedback. Codex CLI and other tools keep their existing routes.

Validation

  • Release packaging succeeded with DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer SIGN_ID=- ./build.sh.
  • Automated tests and runtime verification were not performed.

Limitations

A successful NSWorkspace.open call only confirms URL submission. Thread navigation and window restoration depend on Codex; the existing visibility feedback does not verify the selected thread.

ljt990218 and others added 2 commits October 26, 2026 17:03
`NSWorkspace.open(url)` gives a `codex:` link to the system's default
handler, and more than one installed app can claim Codex's scheme and
bundle id (a second copy of the app, a wrapper), so the link could open
in an app that doesn't hold the thread. The link now goes to the running
Codex Desktop (or the installed one), and if macOS can't deliver it the
jump raises the app as before.

The link is built by a function of the session alone, with tests: only a
Codex Desktop session with a well-formed thread id gets one, never a
Codex CLI in a terminal or another agent run in Codex's own terminal.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@wxtsky
wxtsky merged commit b964954 into wxtsky:main Oct 28, 2026
wxtsky added a commit that referenced this pull request Oct 28, 2026
… idle removal and more

Unreleased notes for this round: the island's 20 fps clock (#381, #391),
"Always allow" holding in its session and Codex rules Codex can use
(#380), shortcuts and pinned displays with a second monitor (#384), pi
and Oh My Pi ringing once a task (#386), the Claude Desktop answer and
background compaction fixes (#389, #388), removing idle cards (#385),
the Codex Desktop thread jump (#387), the DeepSeek whale (#390) and the
Grok / DeepSeek Harness sections in Group by CLI.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@wxtsky

wxtsky commented Oct 28, 2026

Copy link
Copy Markdown
Owner

Thanks @ljt990218! I checked the route against the current Codex Desktop bundle (ChatGPT.app 26.1016, com.openai.codex). It registers codex: and builds codex://threads/<id> itself for local threads, so the link is the right one. I added one maintainer commit on your branch (a81c297):

  • The link now goes to the Codex that is running, not the system's default codex: handler. More than one installed app can claim that scheme and bundle id (a second copy of the app, a wrapper), and the default one doesn't have to be the copy holding the thread. If macOS can't deliver the link, the jump falls back to raising the app as before.
  • The link is built by a function of the session, with tests. Only a Codex Desktop session with a well-formed thread id gets one; a Codex CLI in a terminal, or another agent running in Codex's terminal, never does.

Related, on main: raising any desktop app now brings forward the running copy rather than another install with the same bundle id (a5036e0).

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.

2 participants