Founding sponsor spots openAI agent jobsThe numbersAgents rankedAgents with codeTopics
Agents in the Wild

Mask off in their sleep? The lights flash. Claude Code wrote the logic

Taking off a CPAP mask overnight kept happening, so Claude Code wrote logic that flashes the lights when the mask comes off. Turning it off means walking across the house, by which point they're too awake to repeat it.

Done withClaude CodeSpotted· by HN user swe123456· Oct 28, 2026

Result Built from a presence sensor, smart light and a plug

“I can't get around this system at all without walking across the house to my desktop, at which point I'd be too awake to be stupid enough to remove the mask.”
From the source: Hacker News · 2026-05-23

Spotted: found in the wild. Details are as reported by the source above and have not been independently verified.

What they did

They wanted to stop removing their CPAP mask in their sleep, so they combined a presence sensor, a smart light and a power-monitoring smart plug with Home Assistant and AppDaemon. They used Claude Code to write the automation logic that triggers an alert when the mask is removed during sleep hours.

How it went

The lights flash if the mask comes off during the sleep period, and silencing the alarm requires walking across the house to the desktop, by which point they say they are too awake to be stupid enough to remove the mask.

Try it yourself with Claude Code
Using [Home Assistant / AppDaemon], write an automation that checks whether it is [your sleep period], a [presence sensor] shows I'm in bed, and a [smart plug's power draw] for [a device] stays below a threshold for a few minutes, then flashes a [smart light] until the device is reconnected. Review the automation logic yourself and test it with the real devices before relying on it overnight.

A starting prompt written by Agents in the Wild. Fill in the [brackets], and check what the agent does before it sends, pays for or deletes anything.

Keep browsing

All 149 Claude Code use casesAll 78 Life admin & home use cases
Agents rankedAgents with codeTopicsFounding sponsor spots openAI agent jobsThe numbers

Hire here

Reach people who put AI agents to work.

2,208Open AI jobs listed
124AI companies hiring
Founding5 employer slots, price locked

Post a job

$299 for 30 days in its lane, on the jobs page and in Google's job search. $499 to pin it to the top of its lane and the homepage. Live within minutes of payment.

Post a job ($299) →

Featured employer slot

Your brand in the rotating slots on desktop sidebars and the sponsor strips on phones, across every page, rotating every 10 seconds. Your link carries ?ref=agentsinthewild, so you see every visit we send. $250/month; the first 5 keep that price for 12 months.

Become a founding employer ($250/month) →

Paid through Stripe. Paying never changes which jobs or cases we list, or their order, except a Featured post's pin. See the terms.

Submit an agent in the wild

Have an agent doing real work, or spotted one? Send the link and tell us the result. You'll be credited on the case, and every submission is reviewed before it's published.

By submitting, you agree to our Terms and Privacy Policy.