v0.3.1Lid-closed mode for coding agents

Close the lid.
Your agents keep working.

Afterhours keeps your Mac awake while coding agents work, then lets it sleep when the last one finishes.

For macOS 14 or later. Afterhours isn't notarized yet, so the first time you open it, go to System Settings › Privacy & Security and click Open Anyway.

  • Claude Code
  • Codex
  • OpenCode
  • Antigravity CLI
  • Gemini CLI
  • Copilot CLI
  • Cursor CLI
  • Aider
  • Amp
  • Droid
  • Goose
  • Kiro CLI
  • Kilo CLI
  • OpenClaw
  • Hermes Agent
  • Cline CLI
  • Grok Build
  • Qwen Code
  • Crush
  • Pi
  • fx
Terminal
1:47 AM

Afterhours

Awake for 0h 42m · lid can close

Battery

82% leftStops below 15%

Agents

1 working
Claude CodeMax2 accounts
SessionRuns out in 38m
43% leftResets in 1h 17m
Weekly~8% left at reset
36% leftResets in 21h 17m
CodexPro~/.codex
Session~54% left at reset
88% leftResets in 3h 41m
Weekly~29% left at reset
66% leftResets in 3d 15h

Pause

Psst… it’s interactive. Flip the switch, click an agent, or

The everyday details

Stays up late. So you can go to bed while agents finish the job.

Works with the lid closed

A one-time sudoers rule lets it hold sleep off after you shut the lid.

CodexNeeds you

Waits for your reply

Plugged in, it waits until every session closes. On battery, up to an hour.

23% leftStops below 15%

Lets go before your battery does

Sleeps anyway below your cutoff, in Low Power Mode, or when it runs hot.

Awake
Paused
Sleeping

Steam shows the state

Two wisps, it’s awake. One, it’s paused. None, your Mac can sleep.

⌥⌘L

One shortcut turns it off

Press ⌥⌘L anywhere to turn Afterhours on or off.

$ afterhours-hook amp
--state working

Hooks for any tool

Anything with hooks can report working, waiting, or idle.

Claude CodeIdle after 15m

Catches stuck sessions

Esc skips Claude Code’s Stop hook, so a silent “working” session times out.

AfterhoursNetwork
Analytics
None
Your code
Never read
Limit checks
Optional

No telemetry

It only talks to your providers to show your limits, and you can turn that off.

Go to bed.
Let them ship.

Download for Mac

For macOS 14 or later. Afterhours isn't notarized yet, so the first time you open it, go to System Settings › Privacy & Security and click Open Anyway.