v0.1.0Lid-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

  • 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
Terminal
1:47 AM

Afterhours

Awake for 0h 42m · lid can close

Battery

82% leftStops below 15%

Agents

2 working

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
Sent
0 B
Received
0 B

Private. No network.

It reads process names to spot agents, never your code or terminal.

Go to bed.
Let them ship.