Skip to content

Make playback pause a no-op on macOS#165

Merged
thavelick merged 1 commit into
mainfrom
playback_noop_on_mac
Jul 13, 2026
Merged

Make playback pause a no-op on macOS#165
thavelick merged 1 commit into
mainfrom
playback_noop_on_mac

Conversation

@thavelick

Copy link
Copy Markdown
Owner

Summary

  • The playback --pause-distractions Claude hooks were frequently hanging on macOS. Root cause: nowplaying-cli 2.1.0 works around Apple's macOS 15.4+ MediaRemote lockdown by spawning a perl helper (via mediaremote-adapter). That helper can outlive the script's timeout 2 guard and hold the hook's stdout pipe open, so Claude Code waits on the hook until its 60s timeout.
  • Make playback a no-op on Darwin — exit 0 before touching any backend. The Linux playerctl path is unchanged.

Test plan

  • bash -n bin/playback
  • playback --pause-distractions on macOS returns immediately with exit 0 (~0.25s)
  • shellcheck passes via pre-commit make lint

🤖 Generated with Claude Code

nowplaying-cli 2.1.0 works around Apple's macOS 15.4+ MediaRemote
lockdown by spawning a perl helper via mediaremote-adapter. That helper
can outlive our `timeout 2` guard and hold the hook's stdout pipe open,
hanging Claude Code's Stop/Notification hooks until their 60s timeout.

Skip media control entirely on Darwin; the playerctl path on Linux is
unaffected.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@thavelick thavelick merged commit 89ebce9 into main Jul 13, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant