Codex CLI phone notifications (mirror the Claude hook) - #14
Merged
Conversation
Codex's notify differs from Claude's hooks: it fires only agent-turn-complete, passes the event JSON as argv (not stdin), and exposes no idle/error event to filter on — so codex-notify pushes on turn-complete (Codex's genuine hand-back moment; no intermediate-stop flood), same Pushover pipe + tmux presence suppression. Wired via config.toml's root notify key (prepended, since TOML root keys must precede tables). Gated behind INSTALL_CODEX. Proven end-to-end: a real codex exec invoked the hook with its actual payload. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
oz6un
added a commit
that referenced
this pull request
Aug 20, 2026
…#16) Adds an opt-in INSTALL_KIMI=1 that installs Moonshot's Kimi Code CLI alongside Claude Code and Codex, wired to the same presence-aware Pushover pipe — mirroring the Codex work (#14). - files/kimi-notify.tmpl: Pushover hook. Fires on Stop (turn hand-back — the genuine "over to you"; Kimi has no idle event and Stop fires once per hand-back, confirmed from a captured payload) and StopFailure. Backgrounds the curl (setsid) because Kimi's [[hooks]] has no async flag. - remote-setup.sh: installs from the GLOBAL mirror (code.kimi.ai => region "global"; .com is mainland-CN and mis-targets login) with KIMI_NO_MODIFY_PATH=1, then injects Stop/StopFailure [[hooks]] into ~/.kimi-code/config.toml idempotently (appends — never overwrites, which would drop default_model/providers). config.toml is written by `kimi login`, so injection is post-auth; re-run `make setup` after login. - config.fish owns the ~/.kimi-code/bin PATH entry (added only when present). - setup-user.sh renders the notifier; secrets.env.example gains INSTALL_KIMI. - README + FOOTGUNS: device-code `kimi login`, the region trap, config.toml ownership, and a disk-full note (the box hit 100%, no health alerting). Verified live: install + `kimi login` (device flow) + a real Stop hook → Pushover status:1, and `make setup` converges idempotently. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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.
Why
Codex should ping the phone like Claude Code does, so an agent working on the box reaches you when it hands control back.
What
A
codex-notifyhook mirroringclaude-notify, gated behindINSTALL_CODEX:notifymechanism differs from Claude's hooks — it fires onlyagent-turn-complete, passes the event JSON as an argv argument (not stdin), and has no idle/error/needs-input event to filter on. So the hook pushes on turn-complete, which is Codex's genuine "over to you" moment (it doesn't produce Claude's intermediate-stop flood). Same Pushover pipe, same presence-suppression while you're active in tmux.~/.codex/config.toml's rootnotifykey. Per TOML, root keys must precede tables, soremote-setup.shprepends it (idempotent) and creates the file if absent.setup-user.shrenders the template; install + config wiring happen only in theINSTALL_CODEXblock.Verified
Proven end-to-end on the box: a real
codex execinvoked the hook with its actual payload ({"type":"agent-turn-complete","cwd":"…","last-assistant-message":"…"}) as argv — which also confirmed acwdfield, now used for the project name. Event matrix (stubbed, no phone spam):agent-turn-complete→ push; other types / empty → silent. One real Pushover delivery confirmed.make checkgreen; box hook == rendered repo template;config.tomlnotify sits at line 1, ahead of all tables.🤖 Generated with Claude Code