Chime when your agent is done

The agent and this browser share a machine, so no cloud, no accounts: a tiny relay runs on localhost, your agent’s hooks poke it, and every linked tab here chimes, ducks the ambience, and pauses your game — the site hands you back to work the moment there’s work to go back to.

Prefer to be walked through it? Run npx compiling and pick set up the chime— the menu does everything below for you, including this page’s hook JSON. What follows is the same setup, manually.

1 · Start the relay

npx compiling relay

It binds 127.0.0.1:8303 (loopback only — nothing leaves your machine) and keeps running while you work. Port 8303, because xkcd #303.

2 · Add the Claude Code hooks

Merge this into ~/.claude/settings.json. Stop fires when a turn ends (“your agent is done”); Notification fires when Claude is blocked on you — a permission prompt or a question — which is the more urgent signal. UserPromptSubmit is optional bookkeeping for future features.

{
  "hooks": {
    "Stop": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "curl -s -m 1 -X POST http://127.0.0.1:8303/event -H 'content-type: application/json' -d '{\"type\":\"done\",\"source\":\"claude-code\"}' >/dev/null 2>&1 || true"
          }
        ]
      }
    ],
    "Notification": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "curl -s -m 1 -X POST http://127.0.0.1:8303/event -H 'content-type: application/json' -d '{\"type\":\"waiting\",\"source\":\"claude-code\"}' >/dev/null 2>&1 || true"
          }
        ]
      }
    ],
    "UserPromptSubmit": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "curl -s -m 1 -X POST http://127.0.0.1:8303/event -H 'content-type: application/json' -d '{\"type\":\"started\",\"source\":\"claude-code\"}' >/dev/null 2>&1 || true"
          }
        ]
      }
    ]
  }
}

The -m 1 … || true shape matters: fire-and-forget with a one-second cap, so a stopped relay never slows your agent down. Other agents work the same way — anything that can run a command on completion can curl the relay.

3 · Link this browser

Linking is opt-in and remembered per browser; a agent linked dot appears in the header while the socket is up. From the keyboard: ⌘Kagent link (or agent unlink).

Try it

curl -s -X POST http://127.0.0.1:8303/event -d '{"type":"done"}'

You should hear a soft two-note chime and see the tab title flip. With several tabs linked, only the one you touched most recently chimes — the rest just dip their ambience.

No agent? Chime for any slow command

The site is named for “my code’s compiling” — so builds, test suites, and long installs count too. One line in ~/.zshrc:

eval "$(compiling hook zsh)"

Any foreground command that runs longer than 30 seconds fires the same done chime (COMPILING_MIN_SECS=120 to change the threshold, COMPILING_HOOK_DISABLE=1 to mute — both take effect immediately, no re-init). Faster commands produce no request at all. Privacy: only the command’s first word ever leaves the shell — never arguments, which carry paths and the occasional secret — and only to loopback. The curl is backgrounded with a 0.2s cap, so a stopped relay never slows your prompt. zsh only for now; bash and fish are planned.

Drive the tab from the terminal

With the relay running and a tab linked, compiling forwards anything you type to the site’s command palette — the parked tab switches games without minting a new one:

compiling snake            # the linked tab switches to Snake
compiling daily hive       # jump to a daily
compiling break 2m         # a random game sized for a 2-minute wait
compiling rain 40          # ambience, same "rain 40" as the palette
compiling theme dracula

The CLI carries no game list — the site resolves the words, so the vocabulary is always exactly the palette’s. With no linked tab it opens compiling.games in your browser instead; commands never dead-end. One honest limitation: the tab changes content, but browsers don’t let it steal focus — alt-tab is still yours.

Don’t remember a name? Bare compiling opens a little arrow-key menu of everything — dailies on top, Enter plays. And no browser is needed at all for the terminal tier: compiling play snake, compiling play 2048, and compiling play rain 40 run right in the terminal — same rules modules as the site, recorded ambience beds looped locally.

Browsers

Chromium-based browsers (Chrome, Edge, Arc, Brave) allow a page served over HTTPS to open a WebSocket to localhost, so everything here just works — the same pattern Discord and Figma use for their local helpers. If your browser blocks it, the site simply behaves as if no relay exists; nothing breaks.

Privacy & security

  • The relay binds loopback only. No network calls leave your machine, in either direction.
  • No tokens, deliberately: the worst any local process can do is play you a soft chime. Events carry a type and an optional short label — nothing sensitive.
  • The relay checks WebSocket origins, so arbitrary pages you visit can’t listen in. And the site never uses browser notifications — the chime, the title, and the dot are the whole surface.