send codex completion summaries to telegram with safe markdown rendering.
copy the script to ~/.codex/notify_telegram.py.
create your telegram creds file at ~/.codex/telegram.toml:
bot_token = "123456:ABCDEF..."
chat_id = 462722add a notify entry to ~/.codex/config.toml:
notify = ["uv", "run", "-q", "/home/user/.codex/notify_telegram.py"]- reads
last-assistant-messageand treats it as markdown - renders markdown to html, converts to telegram text/entities via
sulguk, then posts withrequests - normalizes list bullets from
•to-for consistent telegram output - skips auto-approve review summaries emitted by Codex approval auto-review agents