HolyClaude icon indicating copy to clipboard operation
HolyClaude copied to clipboard

Notification support for Codex CLI (and other AI CLIs)

Open tchirou opened this issue 8 months ago • 5 comments

Category

Docker / container improvement

Which variant should this target?

Full only

What would you like?

Notifications via Apprise work great for Claude Code using the notify-on flag file. However, there is no equivalent for the other bundled AI CLIs (Codex, Gemini CLI, Cursor, TaskMaster).

Expected behavior

When a Codex (or other CLI) task completes, a notification should be sent to the configured Apprise destination (Discord, Telegram, etc.), just like Claude Code does.

Suggested implementation

A per-CLI flag file system, e.g.:

  • ~/.claude/notify-on → already works for Claude Code
  • ~/.codex/notify-on → for Codex CLI
  • or a unified ~/.holyclaude/notify-on that applies to all bundled CLIs

Environment

Self-hosted on Synology NAS via Docker, behind Traefik + Authentik.

Use case

The main use case for HolyClaude is walking away and letting agents run. This works perfectly with Claude Code today. Codex and other CLIs are increasingly used for long-running tasks too, and the lack of notifications breaks the "walk away" workflow for those tools.

Alternatives considered

Alternatively, a wrapper script approach where each CLI binary is wrapped to trigger Apprise on completion.

tchirou avatar Mar 28 '26 23:03 tchirou

Shipped in v1.1.7.

Codex and Gemini CLIs now have Apprise notification hooks pre-configured. Same notify-on flag file, same NOTIFY_* env vars, works exactly like Claude Code notifications. No extra setup needed.

Cursor CLI hook is pre-configured but the stop event doesn't work in Cursor CLI yet (only in the IDE). It will activate automatically when Cursor adds support.

Junie, OpenCode, and TaskMaster don't have hook systems so notifications aren't possible for those yet.

Also in this release: Codex CLI is now pre-configured with on-request approval (no more 9x "approve node" prompts), and all CLI configs/auth persist across container rebuilds.

CoderLuii avatar Mar 29 '26 03:03 CoderLuii

Hey @CoderLuii, thanks for adding Codex/Gemini notification support in v1.1.7! For anyone finding that Codex notifications still don't fire after upgrading: the bootstrap only runs once, so if your container predates v1.1.7, the new Codex configuration was never written. You can confirm this is your situation by checking ~/.codex/config.toml — if it doesn't contain [features] with codex_hooks = true, and there's no ~/.codex/hooks.json, your bootstrap ran before the Codex hook setup was added. Two ways to fix it: Option 1 — Re-run bootstrap (cleanest, but resets settings.json and CLAUDE.md to defaults): `rm ~/.claude/.holyclaude-bootstrapped

then restart the container

`

then restart the container

Option 2 — Manually create the missing files (surgical, preserves your existing config): Update ~/.codex/config.toml to add: toml Copy [ features ] codex_hooks = true And create ~/.codex/hooks.json:json { "hooks": { "Stop": [ { "hooks": [ { "type": "command", "command": "/usr/local/bin/notify.py stop", "timeout": 30 } ] } ] } } After either option, make sure ~/.claude/notify-on exists and your NOTIFY_* env vars are set — then Codex notifications should work.

tchirou avatar Mar 29 '26 10:03 tchirou

Hi Would it be possible to get a notification when permissions are asked ? Thanks !

tchirou avatar Mar 29 '26 13:03 tchirou

HI Small follow-up after testing this in a real HolyClaude setup:

Codex CLI and Codex chat are actually two different cases.

What I found:

  • Codex CLI can use ~/.codex/hooks.json
  • but Codex chat inside HolyClaude does not seem to go through those CLI hooks
  • instead, it appears to use HolyClaude’s internal notification flow/server-side provider integration

So from a user perspective, the request is broader than just “support Codex CLI notifications”:

Expected behavior:

  • notifications should work for:
    • Claude chat
    • Claude Code
    • Codex chat
    • Codex CLI
    • ideally the other bundled providers too
  • notifications should be sent on:
    • task completion
    • task failure
  • permission notifications are not needed in my case

Why this matters: A lot of long-running work now happens in the HolyClaude chat providers, not only in the raw CLIs. If notifications only exist for CLI hooks, the “start task and walk away” workflow is still broken for Codex chat.

Suggested implementation:

  • keep CLI hook-based notifications for the raw CLIs
  • but also expose the same notification destinations through HolyClaude’s internal provider/orchestrator layer, so chat-based providers trigger the same end/error notifications

In short: this issue probably needs to cover both:

  1. CLI-level notifications
  2. HolyClaude provider/chat-level notifications

Thanks a lot

tchirou avatar Apr 04 '26 22:04 tchirou

v1.2.5 is out with the follow-up notification fix for this: https://github.com/CoderLuii/HolyClaude/releases/tag/v1.2.5

Codex chat runs in the HolyClaude web UI now send Apprise notifications from the CloudCLI provider lifecycle when a task completes or fails, using the same ~/.claude/notify-on flag and NOTIFY_* destinations as the existing CLI hooks.

Claude Code and raw CLI notifications keep using their existing hooks, and permission prompts are intentionally not sent through Apprise. This release keeps the new CloudCLI bridge scoped to Codex chat to avoid duplicate notifications from providers that already have hook paths.

pull the updated image and recreate the container:

docker compose pull
docker compose up -d

closing this since the Codex chat notification gap is addressed in the release. if another provider still misses completion/failure notifications after pulling v1.2.5/latest, please open a fresh issue with the provider name and updated logs so we can handle it without risking duplicate notifications here.

CoderLuii avatar May 27 '26 22:05 CoderLuii