Free installer · open source

IdlePal for Codex

IdlePal for Codex adds five hooks to ~/.codex/hooks.json, then you trust them once in /hooks. Send Codex a prompt and a game panel from IdlePal, a Mac app with short games and Pip, a desktop pet, drops from your MacBook notch. It flags permission requests and tucks away when Codex stops, is interrupted or ends the session.

Signals from Codex: started, finished and needs you. Nothing else leaves the hook.

Install in Terminal, then trust the hooks in Codex

curl -fsSL https://raw.githubusercontent.com/initiums/idlepal-integrations/main/codex/install.sh | sh
/hooks

Codex runs a new hook only after you trust it once. Open /hooks and approve the IdlePal entries.

Full setup guide
How it works

How IdlePal connects to Codex

The installer uses Codex's own hooks file. Codex runs a new hook only after you trust it, so there is one extra step.

  1. Run the installer

    Paste the command above into Terminal. It adds five hook groups to ~/.codex/hooks.json and keeps your other hooks.

  2. Trust the hooks

    Open /hooks in Codex and approve the IdlePal entries. Until you do, Codex skips them. Then answer Yes when IdlePal asks "Open when your agent works?".

  3. Play while Codex works

    Send a prompt and the panel drops from the notch without taking your keyboard. It tucks away when Codex stops or you interrupt it.

Setup guide

Set up IdlePal for Codex

Every step and file, for when you want the details or something doesn't work.

  1. Install IdlePal from the Mac App Store.

    Download on the Mac App Store

    IdlePal is a Mac app. Open this page on your Mac, or send yourself the link.

  2. Run in Terminal.

    curl -fsSL https://raw.githubusercontent.com/initiums/idlepal-integrations/main/codex/install.sh | sh
  3. Trust the hooks in Codex.

    /hooks
  4. That's it.

    Codex runs a new hook only after you trust it once. Open /hooks and approve the IdlePal entries.

Five Codex events, three signals

Each Codex event runs open -g "idlepal://…" on your Mac with one signal and a session ID. Nothing goes over the network, and the hook never reads your prompts, code or output.

Codex hook events and the signal IdlePal receives for each
Codex eventIdlePal hearsWhat happens
UserPromptSubmitstartedYou sent Codex a prompt. The panel drops from the notch without taking your keyboard.
PermissionRequestneeds youCodex wants approval to run something. If the panel is open, an orange banner appears. It never opens the panel just for this.
StopfinishedCodex finished its turn. If you never clicked the panel, it closes.
InterruptfinishedYou stopped Codex mid-run, so the session doesn't stay marked as working.
SessionEndfinishedThe Codex session ended.

Where the Codex hooks live

~/.codex/hooks.json
Five hook groups are added, one per event above, with a 5 second timeout (1 second for Interrupt and SessionEnd). Your other hooks are kept.
~/.codex/hooks.json.bak-idlepal
A copy of your file from before the change, written on every install and uninstall.
~/.codex/hooks/idlepal-signal.sh
The script the hooks run. It reads only the session_id from Codex's hook input, runs open -g "idlepal://…" and always exits 0.

Codex hooks are new, and their format has changed before. If a Codex update stops Pip waking up, run the install command again: it replaces the IdlePal entries in place.

Interrupts and several Codex sessions

Codex is the one agent where IdlePal hears interrupts. Stop a run and the Interrupt hook sends finished straight away, so Pip doesn't sit awake waiting for a Stop that never comes. Each Codex session sends its own session_id, so two terminals count as two agents and the panel stays down until the last one is done.

Remove the hooks

curl -fsSL https://raw.githubusercontent.com/initiums/idlepal-integrations/main/codex/install.sh | sh -s uninstall

IdlePal keeps working without it: press ⌥⌘G or click the menu bar icon and Pip is there.

If Pip doesn't wake up for Codex

  • Codex skips hooks you haven't trusted. Run /hooks and approve the IdlePal entries.
  • Open IdlePal's Settings → AI agents. If Codex says "Not connected yet", no hook has fired: restart Codex and send a prompt.
  • In IdlePal, check Settings → AI agents → "Open when an agent starts" is on. It stays off until you answer yes to "Open when your agent works?".
  • Open ~/.codex/hooks.json and check for entries that mention idlepal-signal.sh. If the file isn't valid JSON, the installer left it unchanged.
  • Codex running on another machine over SSH runs its hooks there, where they can't reach the app on your Mac.
Signals

What does Pip do when Codex starts, asks or stops?

Five Codex events become three signals. Here is what each one does on your Mac.

Codex starts

The panel drops

You send Codex a prompt and the game panel drops from the notch. It doesn't take your keyboard, so you can keep typing in the terminal.

Codex asks permission

An orange banner

Codex wants approval to run something. If the panel is open, an orange banner appears. It never opens the panel just for this.

Codex stops or you interrupt it

The panel tucks away

A finished turn, an interrupt or the end of the session all send finished. If you never clicked the panel, it closes.

When it helps

When Pip helps during a Codex run

The minutes between sending a prompt and reading the result.

Pip playing a small game next to a laptop while a terminal runs, an illustration of IdlePal's desktop pet

A long turn

Codex works through a big task. Play a round instead of watching the terminal scroll.

Pip pointing at an orange banner on a laptop screen, an illustration of IdlePal's desktop pet

An approval request

Codex stops to ask before running a command. The orange banner tells you to go back to the terminal.

Pip hanging from the top of a laptop screen above a small game panel, an illustration of IdlePal's desktop pet

You stop a run

Interrupt Codex and the panel tucks away straight away, instead of waiting for a Stop that never comes.

Pip sitting between two laptops, each running a terminal, an illustration of IdlePal's desktop pet

Two terminals at once

Each Codex session counts on its own, so the panel stays down until the last one is done.

Privacy

What the Codex hooks send, and what they don't

The hook reads Codex's input only to find the session_id, runs one command on your Mac and exits.

What IdlePal gets

  • One signal: started, finished or needs you
  • The Codex session_id, so several sessions count separately
  • Delivered on your Mac with open -g, never over the network

What it never sees

  • Your prompts
  • Your code and files
  • Codex's output
  • Anything at all from a remote machine over SSH
Compared

Codex's own notifications or IdlePal?

Codex can already notify you in the terminal with tui.notifications. Here is how that compares with the IdlePal hooks.

tui.notificationsIdlePal hooks
SetupA setting in config.tomlOne install command, then trust in /hooks
Fires onEvent types such as agent-turn-complete and approval-requestedPrompt sent, permission request, stop, interrupt and session end
What you getA terminal notification (OSC 9 or the bell)A game panel, Pip and a banner
Trust stepNone, it's a settingApprove the IdlePal entries in /hooks once
Use both?YesYes. The installer only touches the hooks folder and hooks.json, never config.toml.
IdlePal for Mac

The games live on your Mac

IdlePal sits in your menu bar or MacBook notch. The hooks are only the trigger: the games, Pip and the banners are all in the app, and they work without an agent too.

Download on the Mac App Store

IdlePal is a Mac app. Open this page on your Mac, or send yourself the link.

See all 10 games
  • Five free games: Bubble Wrap, Balloon Pop, Fidget Toys, Double Dough and Pip's Garden
  • Ten games with the unlock
  • Open it any time with ⌥⌘G or the menu bar icon
  • No account, no ads, no data collected. macOS 14 or later

Questions about Pip and Codex

Why does Codex ask me to trust the IdlePal hooks?

Codex doesn't run a new hook until you approve it. Open /hooks in Codex once after installing and approve the IdlePal entries. Until you do, Codex skips them and Pip stays asleep.

Does IdlePal tell me when Codex needs permission?

Yes, if the panel is open. Codex's PermissionRequest hook sends needs you, and IdlePal shows an orange banner. If the panel is closed, IdlePal leaves it closed.

What happens in IdlePal when I interrupt Codex?

The Interrupt hook sends finished right away, so the panel tucks away (or shows a banner if you were playing) instead of waiting for the next prompt.

Does IdlePal read my Codex prompts or code?

No. The hook reads Codex's input only to find the session_id, then runs open -g on your Mac. Nothing is sent over the network, and IdlePal never sees prompts, files or output.

What if a Codex update stops the IdlePal hooks working?

Codex hooks are new and their format has changed before. Run the install command again: it replaces the IdlePal entries in place. If /hooks lists them for review again, trust them once more.

Is the IdlePal installer for Codex free?

Yes. The installer is free and open source, in the initiums/idlepal-integrations repository on GitHub. IdlePal itself is free with five games, and the unlock opens all ten.

Pip is waiting in the Mac App Store.

Five games are free for good. One $9.99 unlock opens the rest, plus every game we add later.

Download on the Mac App Store

IdlePal is a Mac app. Open this page on your Mac, or send yourself the link.

macOS 14 or later. No subscription, no account.

Last updated .