A small cron-friendly wrapper that pings codex exec on a schedule so the
Codex 5-hour usage window stays open and overlaps the next one — giving you a
"warmer" of usable quota right when you sit down to work.
If you start coding when you're already 3 hours in your 5 hour windon - you can code for 3hours and use 2 5hour windows (the last 2 hours of the first 5 hour window and the first hour of the second 5 hour window).
mkdir -p ~/bin ~/logs
install -m 755 codex-warmer ~/bin/codex-warmerThe wrapper assumes Codex is installed via nvm and that you've authenticated
with codex login using your ChatGPT account. API-key auth has no rolling
5-hour window, so the warmer would do nothing for you in that mode.
Add this line via crontab -e:
0 */4 * * * $HOME/bin/codex-warmer >> $HOME/logs/codex-warmer.log 2>&1That fires at 00:00, 04:00, 08:00, 12:00, 16:00, 20:00 — so each new 5-hour window opens roughly an hour before the previous one closes, leaving you with overlapping quota whenever you start a session.