feat: bring Codex integration to parity with Claude Code - #155
Merged
Conversation
- Fix duplicate desktop notifications for Codex sessions: OSC notification suppression keyed on agentPIDs[claude_code] only; now a hasHookManagedAgent check covers any hook-managed agent - codex-hook gains notification (Needs input status + attention notification) and session-end (guaranteed PID/status/notification cleanup covering Ctrl+C where stop never fires); both registered in the installed hooks payload - programa codex install-integration / uninstall-integration as the primary names matching the claude convention; install-hooks names remain as working aliases - Install Codex Integration... menubar item mirroring the Claude one - tests_v2/test_codex_install_integration.py: 6 tests incl. legacy alias equivalence pre-tool-use intentionally not mirrored: Claude's verbose tool status is keyed to Claude-specific tool names and payload schemas; adapting it for Codex without knowledge of Codex's tool vocabulary would be guesswork. Verified: build green; all 6 CLI tests pass against the built binary.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
First half of #139: Codex gets the same treatment as Claude Code. Codex sessions now surface "Needs input" the moment Codex is waiting on you, clean up their status properly when a session dies without a clean stop (Ctrl+C included), and stop double-notifying — Codex users currently get two desktop notifications for the same event because the raw-terminal-notification suppression only recognized Claude Code sessions. Plus the same install front door: an "Install Codex Integration…" menu item and
programa codex install-integrationwith diff-and-confirm.Part of #139 (Codex half; the OpenCode half follows separately — its plugin-API research is done and it's unblocked).
Summary
agentPIDs["claude_code"]to ahasHookManagedAgentcheck (any hook-managed agent), both suppression sites.codex-hookevent parity: newnotification(Needs-input status + attention-classified notification) andsession-end(guaranteed PID/status/notification cleanup) events, mirrored from the Claude handlers and registered in the installed hooks payload.pre-tool-usedeliberately not mirrored — Claude's verbose tool status is keyed to Claude-specific tool names and schemas; guessing Codex's vocabulary would be worse than omitting it.codex install-integration/uninstall-integrationbecome the primary commands (matching theclaudeconvention from feat: install Claude Code integration from the menubar #154); the originalinstall-hooksnames keep working as aliases, with a test asserting byte-identical behavior.Test Plan
tests_v2/test_codex_install_integration.py6/6 against the built CLI, no app required (fresh install incl. the two new events + config.toml flag, idempotent reinstall, user-hook preservation, symmetric uninstall, decline-untouched, legacy-alias equivalence)