Blog · September 22, 2026 · 8 min read
How to Leave Claude Code Running While You're Away — Without Leaving Your Mac Wide Open
Yes — Claude Code keeps running when you walk away from your Mac. Your terminal process doesn't care whether you're watching it. The real questions are the ones people usually discover too late: will your Mac sleep mid-run, and what can a passer-by do to an unlocked machine running an agent with your permissions?
What actually breaks unattended runs
- Display and system sleep. Default power settings will sleep your Mac, pausing or killing long runs. Plug in and keep the machine awake for the duration.
- Permission prompts. Claude Code pauses when it needs approval for a risky action. If you're away and can't see the prompt, a 40-minute task quietly becomes a 4-hour one.
- The lock screen. Lock your Mac the normal way and the display goes black. You lose the single most useful signal — glancing over to see if the run finished, failed, or is waiting on you.
The part nobody talks about: physical security
Most "run Claude Code overnight" guides focus on sandboxing the agent — branch isolation, permission modes, kill switches. All good advice. But in an office or coffee shop, the bigger risk isn't the agent misbehaving. It's that an unattended, unlocked terminal is full access to your machine: your shell, your repos, your credentials, and an AI assistant that will happily take instructions from whoever is at the keyboard.
That leaves you with a bad choice. Lock the screen and go blind, or stay unlocked and trust everyone who walks past your desk. We wrote about this trade-off in more depth in vibe coding's unlocked laptop problem.
The watch-only setup
The setup that works is what we call watch-only locking: the screen stays on, your terminal stays visible, and all input is blocked until you authenticate. Concretely, with VibeLock:
- Start your Claude Code task as usual.
- Click Lock in the menu bar. Every app except your allowlist (terminals, Claude, VS Code…) hides; the desktop is covered; input dies system-wide; the display is held awake.
- Walk away. From across the room you can still read agent output — including those permission prompts, so you know when it's worth coming back.
- Come back, touch the keyboard, unlock with Touch ID. Everything hidden returns exactly as it was.
If a colleague needs to approve a prompt while you're away, VibeLock also supports an accessible tier: mark the terminal as accessible and it can be typed in while everything else stays locked — useful for trusted pair-programming setups, though watch-only is the safer default.
Checklist before you walk away
- Mac plugged in; VibeLock holds the display awake while locked.
- Agent work isolated on a branch or worktree with a clear stopping condition.
- Risky operations still behind approval prompts — you'll see them on screen from a distance.
- Lock engaged: input dead, terminal visible, Touch ID to return.
That's the whole workflow. Your agents don't need you at the desk — they need a machine nobody else can touch and a screen you can still read. Do both.