Guide · October 2026

See what Claude Code did while you were away

Did the overnight task finish, where did it stop, is it waiting for your answer — in a minute, without opening every terminal.

The logs are already on your Mac

Claude Code keeps each session's transcript at ~/.claude/projects/<project folder>/<session id>.jsonl. The folder name is the project path with symbols turned into -, and each line is one message. Files can reach hundreds of MB, so read only the end.

f=$(ls -t ~/.claude/projects/*/*.jsonl | head -1)
tail -c 2000000 "$f" | grep '"type":"last-prompt"' | tail -1 | jq -r .lastPrompt

That prints the last thing you asked in the most recent session. For Claude's last reply (first line), use this; fromjson? skips the first line, which may be cut in half.

tail -c 2000000 "$f" | jq -cR 'fromjson? | select(.type=="assistant") | [.message.content[]? | select(.type=="text") | .text] | last // empty' | tail -1 | jq -r . | head -1

Stuck or still thinking?

Whether a silent session is working or stuck is mostly answered by when its transcript last changed: the log keeps growing during long thinking and long replies.

for f in $(ls -t ~/.claude/projects/*/*.jsonl | head -5); do
  echo "$(( ($(date +%s) - $(stat -f %m "$f")) / 60 )) min  $(basename "$(dirname "$f")")"
done

If a session that should be working hasn't changed in 15+ minutes, it's usually a dropped connection, a hung tool, or a pending approval. If the last reply ends with a question mark, it's waiting for you.

If the lid was closed

Closing a MacBook's lid sleeps the Mac and Claude Code stops with it. The Claude desktop app's “keep awake while working” setting, by its own description, only prevents idle sleep. If the “minutes ago” above stopped around when you closed the lid, that's almost certainly why. Keep a MacBook awake with the lid closed

Automatically with Lidnight

Lidnight does all of this for you. It keeps a closed Mac awake only while work runs, and when you open the lid or come back after 20+ minutes away it shows a recap: each task's result as of the moment it finished, which ones ended with a question for you, pending approvals, tokens used (cache share, output), battery and weekly limit. A running session that goes quiet for 15 minutes triggers a “Looks stuck” alert.

Logs are read on this Mac for display only — nothing is stored or sent. On your phone, results appear on the end-to-end encrypted status page.

Try Lidnight free

Apple Silicon Macs · macOS 13 or later. Every download includes a free trial of everything in Pro (5 lid-closed runs or 14 days), no payment details needed. Pro is a one-time payment (1 Mac $9.99 · 3 Macs $14.99) with a 14-day refund.

Homebrew: brew install whereisdw/tap/lidnight