Stop Claude Code Push Spam with Presence Files
Learn how Claude Code’s CLAUDE_CLIENT_PRESENCE_FILE can quiet mobile notifications when you’re already at your desk, using lightweight screen-lock automation on macOS or Linux. The episode also covers faster startup with Bun 1.4, smoother line-by-line streaming, and handy inline config overrides.
Is this your podcast and want to remove this banner? Click here.
Chapter 1
Taming Claude Code Notification Fatigue
Lachlan Reed
Welcome to the show, everyone! I'm Lachlan Reed, here with James Turner, and today's episode is brought to you by Jellypod AI. Now, James, picture this: you're sitting at your desk, absolutely in the zone, staring at your monitor. Suddenly, your thigh starts buzzing like a trapped hornet because your phone is going mental with push notifications about the exact terminal task you're already watching on your screen. [laughs] It's enough to make you throw your phone out the window!
James Turner
Oh, I know that pain. [laughs] You're using Claude Code's Remote Control to monitor some massive, multi-hour build, which is fantastic when you're getting a coffee, but a total distraction nightmare when you're actively sitting there. It's like your terminal is screaming "Hey! Look at me!" while you are literally looking at it.
Lachlan Reed
Exactly! [excited] It's a proper head-scratcher. But the folks behind Claude Code must have felt our pain, because in version 2.1.181, they've introduced this clever little environment variable called `CLAUDE_CLIENT_PRESENCE_FILE`. It basically acts like a digital "do not disturb" sign for your phone when you're at your desk.
James Turner
Okay, so how does it actually know you're there? Is it running some heavy background daemon that's constantly eating up CPU cycles to poll your system status?
Lachlan Reed
Nah, mate, they've gone for a beautiful, lightweight approach. No polling at all. Instead, Claude Code checks for the existence of this specific marker file on-demand. When a notification-triggering event happens, it quickly glances to see if that file exists. If it does, it assumes you're at your computer and silences the mobile push. It's brilliant—zero CPU overhead, taming the beast without melting your laptop.
James Turner
Ah, that's incredibly elegant. [thoughtfully] So the presence file itself is just a dummy file, and we get to decide how to create and destroy it. To implement this, you'd just export `CLAUDE_CLIENT_PRESENCE_FILE` pointing to a temporary path, like `/tmp/claude_present`. But then how do we automate the locking mechanism?
Lachlan Reed
Spot on! You just wire it up to your OS screen-lock events. If you're on a Mac, you can write a tiny Hammerspoon script to watch for when your screen unlocks, which then touches the file to create it. When you lock up and walk away, Hammerspoon deletes it. If you're on Linux, you can do the exact same thing using a `dbus-monitor` hook.
James Turner
That's brilliant because it ties directly into your physical presence. Lock your screen, the file vanishes, and your phone starts buzzing again to keep you updated while you're away. That is top-tier notification hygiene.
Lachlan Reed
Fair dinkum, it makes a massive difference to your focus. And look, v2.1.181 didn't just stop at notification fixes. They've also upgraded the engine under the hood to Bun 1.4, which makes the tool start up noticeably faster. Plus, they've tweaked the streaming output so it renders line-by-line now.
James Turner
Oh, the line-by-line streaming is huge! [excited] It means no more of that weird, chunky flickering in the terminal when Claude is responding. It just flows naturally. And they added inline config overrides, right? Like, you can just type `/config key=value` directly into the prompt to change settings on the fly without digging into config files.
Lachlan Reed
Yeah, no worries about restarting your session just to tweak a minor setting. It's a fantastic quality-of-life release. That's all we have for today's quick look at Claude Code. I'm Lachlan Reed.
James Turner
And I'm James Turner. See ya! [warmly]
