[{"data":1,"prerenderedAt":457},["ShallowReactive",2],{"project-48701512":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":29,"sentiment":30,"stance_mix":31,"scored_comments":36,"aspects":37,"strip":44,"post_text":46,"what":47,"said":72,"maker_in_thread":190,"shape":202,"grid":206,"attempts":419,"same_week":420,"maker_shows":268,"maker_hidden":450,"reader_version":451,"card":452},"48701512","Adrafinil","keep a lid-closed Mac awake only while agents work","title","Show HN: Adrafinil – keep a lid-closed Mac awake only while agents work","https:\u002F\u002Fgithub.com\u002Fkageroumado\u002Fadrafinil","github.com","kageroumado",1782592493,2026,124,78,529,4366,13,"notable","dev_tools","agent sleep prevention","desktop_app",[24,25,26,27,28],"mac sleep prevention","lid closed mac","ai agents","pmset disablesleep","claude code hooks","curious",-0.06,{"positive":32,"neutral":33,"mixed":34,"critical":35},6,16,1,8,31,{"idea":38,"performance":40,"execution":42},{"positive":32,"critical":39},5,{"positive":41,"critical":34},0,{"positive":41,"critical":43},2,[45,39,45,41,45,41,45,41,41,41,41,45,41,39,34,41,34,45,39,41,41,41,45,45,34,34,41,45,45,34,41,45,41,34,41,39,41,45,39,45],3,"A month ago there was a wave of posts and tweets about engineers walking around cafes and parks with their MacBooks propped half-open, as fully closing the lid forces sleep that stops their AI agents. Some people made snarky comments about using tmux or Amphetamine, and some defended their choice with “but I only need it sometimes, and forgetting to disable Amphetamine and finding my laptop discharged in my bag is worse.”\n\nThis is a solution to this problem. Unlike caffeinate, it will prevent your MacBook from sleeping even with the lid closed, with no external power or display, using pmset di",{"problem":48,"audience":54,"pricing":62,"motivation":63,"time_to_build":62,"stack":68,"openness":69,"stage":70,"team_size":71},{"value":49,"source":50,"evidence":51},"Closing a MacBook lid forces sleep, which stops AI agents running in the background","maker",[52],{"id":53},"post",{"value":55,"source":56,"evidence":57},"Developers running AI coding agents such as Claude Code and Codex on MacBooks","inferred",[58,59],{"id":53},{"id":60,"by":11,"text":61},"48702632","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…",null,{"value":64,"source":50,"evidence":65},"Engineers' laptops sleeping mid-task with lid closed, and existing apps not suited to agent workflows",[66,67],{"id":53},{"id":60,"by":11,"text":61},[],"open_source","launched","unknown",{"praise":73,"objections":92,"requests":133,"questions":141,"alternatives":160},[74,86],{"value":75,"source":76,"evidence":77},"Useful for keeping agents running overnight or on the move","commenter",[78,82],{"id":79,"by":80,"text":81},"48715162","felixlu2026","honestly this is the kind of boring tool that matters once agents run for hours. laptop sleep has killed more useful runs than bad prompts for me.",{"id":83,"by":84,"text":85},"48702090","xbar","Nice. I needed this yesterday, and will need it again today.",{"value":87,"source":76,"evidence":88},"Simple approach to an annoying problem",[89],{"id":90,"by":11,"text":91},"48702070","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…",[93,104,111,122],{"value":94,"source":76,"evidence":95},"Amphetamine already does this with existing features",[96,100],{"id":97,"by":98,"text":99},"48701868","dawnerd","But Amphetamine has an option to end when an app closes. I’m just so confused why everyone using ai is reinventing solutions that already exist.",{"id":101,"by":102,"text":103},"48704876","strus","I am always baffled how many people does not know about Amphetamine.",{"value":105,"source":76,"evidence":106},"Thermal risk when running a closed laptop in a bag",[107],{"id":108,"by":109,"text":110},"48701682","moralestapia","What's old is new again, but I welcome this. I used to do this 15 years ago to keep listening to music from my laptop (one of the white chiclet ones) in my backpack, can't…",{"value":112,"source":76,"evidence":113},"Reimplements a one-line pmset command",[114,118],{"id":115,"by":116,"text":117},"48701815","xlii","Um so it is ``` sudo bash -c 'touch KEEP_RUNNING; pmset -b sleep 0; pmset -b disablesleep 1; while [ -e KEEP_RUNNING ]; do sleep 1; done; pmset -b sleep 5; pmset -b disablesleep…",{"id":119,"by":120,"text":121},"48702020","rancar2","For MacOS, keep awake with: sudo pmset -a disablesleep 1 Reset back: sudo pmset -a disablesleep 0",{"value":123,"source":76,"evidence":124},"Bloated for its purpose",[125,129],{"id":126,"by":127,"text":128},"48703024","slopinthebag","15k loc for this? holy cow",{"id":130,"by":131,"text":132},"48701912","cyclopeanutopia","Ridiculous bloat.",[134],{"value":135,"source":76,"evidence":136},"Track battery and token usage while agents run",[137],{"id":138,"by":139,"text":140},"48704411","tam159","It would be great if adrafinil can also track the battery and token usage while agents are working",[142,149],{"value":143,"source":76,"evidence":144},"How it differs from existing sleep-prevention apps like cc-caffeine",[145],{"id":146,"by":147,"text":148},"48703282","AussieWog93","How does this differ from https:\u002F\u002Fgithub.com\u002Fsamber\u002Fcc-caffeine?",{"value":150,"source":76,"evidence":151},"Whether closed-lid operation throttles M-series CPUs",[152,156],{"id":153,"by":154,"text":155},"48704602","dcan","Does closing the M-series laptop lid no longer throttle the CPU like it did on the Intel ones?",{"id":157,"by":158,"text":159},"48709417","Maxious","It is supported https:\u002F\u002Fsupport.apple.com\u002Fen-us\u002F102555 but thermal throttling reduces performance…",[161,169,179,183],{"value":162,"source":76,"evidence":163},"Amphetamine",[164,168],{"id":165,"by":166,"text":167},"48703133","exabrial","Amphetamine is what I use. It has a robust set of triggers, like if you ip address changes to a certain subnet (like private IPs on a work network)…",{"id":97,"by":98,"text":99},{"value":170,"source":76,"evidence":171},"caffeinate",[172,176],{"id":173,"by":174,"text":175},"48703128","47","I have been using the builtin macOS `caffeinate` command for this. For example: caffeinate -dimsu That keeps the Mac awake so I can use Claude remotely from phone. You can also…",{"id":177,"by":11,"text":178},"48702050","Caffeinate doesn’t prevent sleep with the lid closed.",{"value":180,"source":76,"evidence":181},"cc-caffeine",[182],{"id":146,"by":147,"text":148},{"value":184,"source":76,"evidence":185},"modafinil status bar app",[186],{"id":187,"by":188,"text":189},"48703191","hamza_q_","This works great. Only downside is display doesn't turn off when you close the lid. Made a little status bar utility to wrap the disablesleep command and address that downside:…",{"comments":191,"answered":45,"key":192},11,[193,196,199],{"id":194,"text":195},"48702151","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…",{"id":197,"text":198},"48702506","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…",{"id":200,"text":201},"48701909","Probably less irritable than amphetamine~",{"commenters":203,"max_depth":32,"maker_replies":191,"first_comment_mins":204,"lifespan_hours":205},55,19,48,[207,209,213,217,220,223,226,230,232,235,236,239,241,244,246,250,253,256,258,260,262,264,267,269,272,275,277,280,283,286,288,291,293,296,297,300,302,303,304,305,307,309,313,315,318,322,324,328,331,333,334,337,338,341,343,345,347,350,352,355,359,361,365,369,372,374,377,380,382,385,387,390,393,398,402,406,410,411,415,417],[165,41,45,208,166,41],"project\u002Fneutral\u002Fidea",[210,41,41,211,212,41],"48704484","commenter\u002Fneutral\u002Fnone","anonuser123",[214,34,39,215,216,41],"48701845","project\u002Fpositive\u002Fidea","chopete3",[218,34,45,208,219,41],"48701989","bluedino",[221,34,45,208,222,41],"48701998","fragmede",[224,34,41,211,225,41],"48702048","doubled112",[227,34,41,228,229,41],"48709926","other\u002Fneutral\u002Fnone","hhh",[194,34,41,231,11,34],"project\u002Fneutral\u002Fdesign",[233,34,45,234,216,41],"48702353","project\u002Fneutral\u002Fnone",[197,34,41,231,11,34],[237,43,41,228,238,41],"48701661","processunknown",[200,43,41,240,11,34],"maker\u002Fneutral\u002Fnone",[242,43,41,228,243,41],"48703584","loeg",[108,45,45,245,109,41],"project\u002Fmixed\u002Fperformance",[247,45,41,248,249,41],"48701763","commenter\u002Fneutral\u002Fperformance","dominotw",[251,45,41,248,252,41],"48701770","dmd",[254,45,41,248,255,41],"48701824","NewJazz",[257,45,41,248,243,41],"48703594",[259,45,41,211,109,41],"48703872",[261,45,41,211,243,41],"48704387",[263,45,41,248,255,41],"48711036",[265,45,41,266,11,34],"48701887","project\u002Fneutral\u002Fperformance",[173,268,45,234,174,41],4,[270,268,41,228,271,41],"48703206","zxexz",[273,268,41,228,274,41],"48719895","port11",[276,268,41,234,11,34],"48703502",[278,268,41,228,279,41],"48703530","steve-atx-7600",[281,39,39,215,282,41],"48702013","aqme28",[284,39,41,228,285,41],"48724638","EddieLomax",[97,32,34,287,98,41],"project\u002Fcritical\u002Fidea",[289,32,41,228,290,41],"48701937","conception",[292,32,41,208,11,34],"48701942",[294,32,34,287,295,41],"48702055","flexagoon",[60,32,41,208,11,34],[298,32,41,228,299,41],"48702107","neoecos",[119,301,45,234,120,41],7,[90,301,41,234,11,34],[83,301,39,215,84,41],[187,301,41,228,188,41],[306,301,41,211,11,34],"48703423",[308,301,41,211,188,41],"48704074",[310,301,41,311,312,41],"48704191","other\u002Fpositive\u002Fnone","freakynit",[314,301,41,228,188,41],"48704281",[316,35,41,228,317,41],"48702793","lellow",[319,320,45,266,321,41],"48703131",9,"IncreasePosts",[323,320,41,211,243,41],"48703600",[325,326,45,266,327,41],"48702574",10,"mr_toad",[329,326,45,266,330,41],"48702678","herrkanin",[157,326,34,332,158,41],"project\u002Fcritical\u002Fperformance",[153,191,45,266,154,41],[126,335,34,336,127,41],12,"project\u002Fcritical\u002Fexecution",[146,18,45,208,147,41],[339,18,41,340,11,34],"48703465","project\u002Fneutral\u002Fexecution",[342,18,41,211,147,41],"48704367",[115,344,45,208,116,41],14,[346,344,41,228,222,41],"48701988",[348,344,41,228,349,41],"48702068","da_grift_shift",[138,351,45,208,139,41],15,[353,33,34,336,354,41],"48704554","NDlurker",[356,357,34,287,358,41],"48703078",17,"geor9e",[101,360,41,228,102,41],18,[362,204,41,363,364,41],"48708220","other\u002Fcritical\u002Fidea","Msurrow",[366,367,45,208,368,41],"48701832",20,"operatingthetan",[370,367,41,228,371,41],"48702255","unacorner",[373,367,41,228,368,41],"48702318",[375,367,41,228,376,41],"48702932","treme",[378,367,45,379,188,41],"48703063","maker\u002Fneutral\u002Fidea",[381,367,34,287,368,41],"48704017",[383,367,41,384,188,41],"48704071","commenter\u002Fneutral\u002Fidea",[386,367,41,211,368,41],"48704085",[388,367,39,215,389,41],"48704794","oenton",[391,367,41,228,392,41],"48706770","hoppp",[394,395,41,396,397,41],"48703137",21,"other\u002Fneutral\u002Fidea","2001zhaozhao",[399,400,41,396,401,41],"48702146",22,"cyanydeez",[403,404,41,363,405,41],"48704035",23,"kylehotchkiss",[407,408,45,208,409,41],"48701929",24,"WUMBOWUMBO",[177,408,41,266,11,34],[412,413,39,215,414,41],"48713827",25,"Rutvik_Pansare",[79,416,39,215,80,41],26,[130,418,34,287,131,41],27,[],[421,426,431,436,441,445],{"id":422,"name":423,"points":424,"category":425},"48673671","Hacker News Trends",822,"data",{"id":427,"name":428,"points":429,"category":430},"48708182","Zanagrams",400,"games",{"id":432,"name":433,"points":434,"category":435},"48752905","worker-owned",398,"web_saas",{"id":437,"name":438,"points":439,"category":440},"48675435","OpenKnowledge",381,"productivity",{"id":442,"name":443,"points":444,"category":20},"48688700","Weave Router",216,{"id":446,"name":447,"points":448,"category":449},"48703412","Decomp Academy",197,"learning_science",false,"v2",{"id":453,"name":5,"line":6,"ai":450,"cat":20,"year":13,"points":14,"comments":15,"rec":29,"s":30,"top":18,"kw":454,"maker":11,"domain":10,"tier":19,"attempts":41,"strip":455,"url":9,"mix":456,"praise":75,"objection":94,"sub":21},48701512,[24,25,26,27,28],"3530303000030510135000331103310301050353",[32,33,34,35],1793991158000]