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.
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.
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.
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.
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.
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.
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).
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.