Better HN
topnewbestaskshowjobs
Log inSign up

kageroumado

267 karma · joined Mar 19, 2026 (8mo ago) · 52 submissions

I'm Mado Kagerou, publishing as kageroumado: an independent researcher and expert Swift engineer with more than ten years of software development experience. My research interests center on computational pharmacology, computational neuroscience and AI safety. My engineering specialties include Apple platform internals, reverse engineering, GPU rendering and local model training. Contact: mail@kagerou.glass
Submissions

comment 5mo ago · link · parent

Claude Code actually uses caffeinate -i -t 300 during Claude’s turn, restarted automatically until the turn finishes.

comment 5mo ago · link · parent

It’s an Electron app that uses powerSaveBlocker to prevent display sleep. It won’t prevent macOS system sleep on lid close with no power.

comment 5mo ago · link · parent

Afinils are cool, and your app is cool too~

comment 5mo ago · link · parent

This looks beautiful! I hope it works out well for you

comment 5mo ago · link · parent

In order to get the same behavior with Amphetamine you’ll need to: 1. Install it from the AppStore (no brew, no GitHub) 2. Not forget to enable lock on lid close 3. If you ever connect/disconnect power while the lid is closed without the optional “Power Protect” system, the MacBook will sleep. The system is a script and a configuration file making sudo pmset -a disablesleep passwordless. 4. Add hooks to Claude Code configuration that will use Apple Script to start and stop Amphetamine sessions. For Codex you’ll have to make a script that will watch process activity to know when a turn ends.

It’s not like Amphetamine can’t do the same, it’s that this app is made specifically for AI agents and nothing else.

comment 5mo ago · link · parent

The app is built for 26+, as I never tested it on earlier versions. It won’t solve your specific case, though, as it only prevents sleep. It won’t wake it once it’s already sleeping.

comment 5mo ago · link · parent

The dummy display enables “clamshell mode,” which lets your MacBook stay awake even with the lid closed, provided that it’s also on AC power. If the MacBook is not connected to power, the clamshell mode isn’t activated and it will sleep normally.

Adrafinil simply disables the global sleep without spoofing hardware, and re-enables it once the agent is done working, the temperature is too high, or the battery is low.

comment 5mo ago · link · parent

This is exactly what the app does, except it ties it to agent activity and re-enables sleep once the turn ends, the laptop is close to overheating, the battery is low, or on a timer.

comment 5mo ago · link · parent

Caffeinate doesn’t prevent sleep with the lid closed.

comment 5mo ago · link · parent

Claude Code or Codex (normally) don’t close the terminal window after a turn ends, they wait for the user’s reply.

comment 5mo ago · link · parent

Probably less irritable than amphetamine~

comment 5mo ago · link · parent

It has a setting for thermal cutoff that you can set to something like 60º C. Sleeping will stop heavy work (like a build) before it leads to overheating.

13.

Show HN: Adrafinil – keep a lid-closed Mac awake only while agents work(github.com ↗)

124 points · by kageroumado · 5mo ago · 78 comments

comment 5mo ago · link · parent

Not only the power plants, but power in residential areas too. Cables and distrubution transformers overheat, forcing shutdowns.

comment 5mo ago · link · parent

There’s going to be more and more propaganda about open models being a tool to program your children into being Chinese spies or some other absurd reason, and then a new beautiful law will be enacted unanimously, banning their use. And “thankfully," child-protecting measures will by then be implemented at the OS level.

comment 5mo ago · link · parent

If anything open-source models are a hedge against the apocalypse. Or at least against the cyberpunk dystopia.

comment 6mo ago · link · parent

Swift is something that works very well if you enforce Swift 6 + good architecture and doesn’t work very well and ends up with slop if you don’t.

Usually once the project is already established and has good patterns, both Claude and GPT will continue the good patterns, but you may still want to add a review pass step to remove bad practices (usually hacks around concurrency instead of doing it properly).

comment 6mo ago · link · parent

Yesterday I posted my video wallpaper app which adds a custom section to your wallpaper settings and allows to use any videos you want. If you want to know how to inspect and reverse-engineer any other Apple framework, this article outlines how to do this.

I recommend asking Claude to do this and periodically check what happens. It can take a long time and quite a lot of tokens to test all the possibilities.

comment 6mo ago · link · parent

Thank you! I’m glad you like it

comment 6mo ago · link · parent

My repo has a skill that describes most of my approaches in more detail.

https://pastebin.com/XLhjr4pf https://github.com/kageroumado/swiftui-macos-skill

comment 6mo ago · link · parent

It’s actually configurable. You can make it keep playing if you want to.

comment 6mo ago · link · parent

Could you please open a PR with your refactor? This way everyone can benefit

comment 6mo ago · link · parent

Yes, I told Claude to design it to their taste, I just provided the screenshots and the video.

comment 6mo ago · link · parent

Thank you! The way it works is that the video playback is shared between the lock screen and the desktop, and Apple’s framework transparently switches the surface it’s displayed to.

comment 6mo ago · link · parent

Yes, I agree with you. It’s my first project of this scale and distribution isn’t something I’m good at. Hopefully, the open source version will have a better future

The browser is now open-source at https://github.com/kageroumado/refrax-browser/

comment 6mo ago · link · parent

I’ll open source it

comment 6mo ago · link · parent

Not much, Claude was trying different things on their own for hours. It was Opus 4.6, this public release was done by 4.7

comment 6mo ago · link · parent

The video will keep playing on the lock screen, but screen savers are a different thing. You can have the same video as your wallpaper and screen saver though.
12