Practical Advice: Sleep, Code, and the Pendulum
Living with Bipolar in the age of AI-assisted programming (2026)
Since November 2025, my life has been a violent swing between extremes. I was recently diagnosed with Bipolar, and while that diagnosis explained a lot, it also forced me to re-read my entire history through a different lens.
I did what programmers do: I researched it. I read clinical writeups, personal essays, forum threads, and old blog posts from developers with bipolar disorder. Some of it helped. A lot of it felt dated. Most of what I found was pre-2020, before AI copilots, agentic workflows, and this always-on pressure to ship faster than your nervous system can safely handle.
So here’s my 2026 version.
The first rule is boring, non-negotiable, and life-saving: sleep. Sleep is not a wellness suggestion; it is core infrastructure. Wake up at the same time every day. Don’t “borrow” from sleep on weekdays and pay it back on weekends. Don’t pull all-nighters for deadlines, YouTube, or ego. Once my sleep gets unstable, mania is usually behind it, and the crash can cost me months.
Mania does not always feel like a problem when it starts. It can feel like clarity, confidence when paired with AI, and unstoppable productivity. I spent hours studying agentic engineers, learning from the best. From the outside, it can look like 14 to 16 hour coding days, no fatigue, rapid-fire opinions, these days impulsive AI decisions. In an AI-assisted workflow, that state can get supercharged: more output, faster iteration, less friction, fewer natural stopping points. It feels incredible right until it doesn’t.
Then the pendulum swings. Hard. The depressive phase is slower, heavier, and usually longer. I think about all the folks who aren’t getting AI right now. Getting out of bed becomes a win. Basic care becomes work. Coding, even eating can feel impossible. During those periods, I’ve had frightening flashes of suicidal ideation that scared me enough to realize I needed more than willpower. I needed structure, treatment, and honesty. Once I got those, I was feeling better about AI assisted coding because I learned to control the contaigion. If you have substance issues or practical mental health concerns and want to dive deep into agentic engineering: have a good plan, sleep well, and stay hydrated. AI can be a vampire. I’m serious as an experienced engineer who was very AI-coding skeptic, this is the advice I wish I had last holiday season.
One thing that actually helps: tracking mood daily. A simple diary can reveal patterns your brain will hide from you in real time. It turns chaos into data. It won’t prevent every swing, but it gives you earlier warning signs and more chances to intervene before things spiral.
I’m not writing this because I have it all figured out. I’m writing it because bipolar disorder in tech still gets flattened into stereotypes: “depressed” or “genius mode,” broken or brilliant. Reality is messier. Treatment helps. Medication helps. Sleep helps most. And in a world where AI can amplify your output overnight, protecting your baseline mental stability matters more than ever.
If you relate to this and you’re wondering whether your “good weeks” are actually hypomania or mania, don’t self-diagnose from a thread and move on. Talk to a psychiatrist. Stay in care when you feel better, not just when you feel terrible. Feeling better is not the finish line; it’s when the real maintenance starts.
Inspired by: https://thewalrus.ca/on-being-bipolar/

