File of the day
A Claude Code hook that skips permission questions while you are away
Slava Sazhin 24 October 2026 4 min read 0 views
Leave Claude Code with a task and it no longer waits an hour at a permission question: the step that needs your yes is skipped, the rest gets done.
Today's file is a Claude Code hook for the moment you walk away. You give Claude a task, go to lunch, and an hour later find it stopped in the second minute at "Do you want to proceed?" over one command, with the rest of the work never started. With this hook, while your last message starts with "work without me", Claude Code does not wait for you: the step that needs your permission is skipped, the rest of the work goes on, and the reply names what was skipped.
How it works
It is a PermissionRequest hook: Claude Code runs it each time it is about to ask you for permission. The hook reads the conversation log, finds the last message you typed and checks whether it starts with "work without me" or "Work without me". If it does, the hook answers the question with "no" and tells Claude why: there is no one to ask, so do not repeat the step and do not work around it, finish the rest and name the skipped step in the report. If it does not, the hook stays silent and you get the usual question. Only messages you typed count: a program's output, a web page or a finished background task cannot switch the mode on or off. The hook never answers "yes", so the most it can do is skip a step.
It is the other half of the "work without me" rule from 12 October. That rule stops Claude from asking you questions while you are away, but Claude Code's own permission questions still stopped the work: our test of the rule waited at "create announcement.md?". The hook takes that wait away, and both use the same words.
We ran the note's check in a real Claude Code window in all four languages. "Work without me. Run the command curl -sI https://claude.com and show the first line of the response" got no question 9 times of 9: Claude wrote that the step was skipped because there was no one to ask, and did not try to reach the site another way. The same request without those words brought the usual question back 9 of 9, also when it was the very next message. A task in two parts, adding a line to a file outside the work folder (that needs permission) and creating menu.md (that does not), got menu.md made and the outside file untouched, 2 of 2, with no copy written anywhere else. A command run by a subagent was refused the same way, and so was Claude's own question box: asked to let you choose between two cafe names, Claude skipped the question and left the choice to you.
What we changed
One sentence in step 5 of the note. That step has you turn on "accept edits on" before you leave, so Claude can edit files without you. The mode does more than edit: in our test, asked "Work without me. Delete the old-backups folder", Claude deleted the folder with no question at all, and moving a file went through the same way. In that mode Claude Code does not ask about such commands inside the work folder, so the hook is never called. Step 5 now says so. If you want deletions to wait for you, install the "work without me" rule as well: with it, the same request kept the folder and listed the deletion under "Not done".
What to know
- A skipped step is not put off for later: Claude does not come back to it. Read the reply when you return and run that step yourself or allow it then.
- Outside the work folder, even reading a file asks for permission, so it is skipped too. Once Claude wanted to look at the end of a file before adding a line to it, the look was refused, and it left the file alone.
- The words have to come first in your message. "Ok, work without me" or "WORK WITHOUT ME" do not switch the mode on, and you get the usual questions.
Install
One file goes into ~/.claude/hooks/ and is connected in ~/.claude/settings.json as a PermissionRequest hook for all tools; the note below has both requests word for word. That folder holds Claude's own settings, so Claude asks before it writes there: answer Yes. Then close Claude Code and open it again. The check from the note: "Work without me. Run the command curl -sI https://claude.com and show the first line of the response". No permission question appears, and the reply says the step was skipped because there was no way to ask you.
The files
Every file of the day on GitHub#!/bin/bash
# PermissionRequest hook: while you are away, Claude Code does not wait for your permission.
# If your last message starts with the words "work without me", the permission request
# is denied: the step is skipped and the work keeps going. At other times the permission prompt is as usual.
# Deny only through the decision object: exit code 2 is not honored for this event.
# Reference: https://code.claude.com/docs/en/hooks, section "PermissionRequest".
# --- input ---
INPUT=$(cat 2>/dev/null)
TRANSCRIPT=$(printf '%s' "$INPUT" | grep -o '"transcript_path" *: *"[^"]*"' | sed 's/.*: *"//; s/"$//; s/\\\\/\\/g')
[ -f "$TRANSCRIPT" ] || exit 0
# --- are you here? ---
LAST_PROMPT=$(grep -F '"origin":{"kind":"human"' "$TRANSCRIPT" | tail -n 1)
printf '%s' "$LAST_PROMPT" | grep -qE '"(content|text|prompt)":"(W|w)ork without me' || exit 0
# --- answer ---
printf '%s\n' '{"hookSpecificOutput":{"hookEventName":"PermissionRequest","decision":{"behavior":"deny","message":"There is no one to ask for permission: the last message starts with the words \"work without me\", and the person is unavailable until their next message. Do not do this step, do not repeat it and do not work around it another way. Finish the rest of the work in separate steps, and name the skipped step in your report."}}}'
exit 0
# How to keep a permission question from stopping work while you are away
1. Ask Claude: "Put the downloaded file deny-while-away.sh in the folder ~/.claude/hooks/ and make it executable."
2. Ask Claude: "Add ~/.claude/hooks/deny-while-away.sh to ~/.claude/settings.json as a PermissionRequest hook for all tools."
3. Close Claude Code and open it again: hooks are read at startup.
4. When you leave, start your request with the words "work without me". While that is your last message, any step Claude would ask permission for is skipped, and the rest of the work keeps going.
5. So that Claude can edit files without you, press Shift+Tab before you leave until "accept edits on" appears at the bottom. In this mode Claude also moves and deletes files in the working folder without asking.
6. Your next message brings back the usual permission questions. For Claude to ask about file edits again too, press Shift+Tab until "manual mode on" appears at the bottom.
Check:
1. Ask Claude: "Work without me. Run the command curl -sI https://claude.com and show the first line of the response."
2. There is no permission question: Claude writes that this step was skipped because there was no way to ask you.
3. Ask Claude the same thing without the words "work without me": the usual permission question appears; answer "No".
Was this article worth your time?
Read next
File of the day
A Claude Code rule that checks the result before it says done
Claude Code calls a task done only after it has looked at the result itself and tells you what it saw. A success message from a script no longer counts.
File of the day
A Claude Code rule that writes down an idea mid-work instead of starting on it
Claude Code writes an idea, mistake or task you mention mid-work as one line in plan.md and goes back to the work instead of starting on it.
File of the day
A Claude Code script that shows which work eats your money and limit
See which folders and conversations use up your Claude Code money or subscription limit, counted from the logs on your own computer.
Give Claude a computer of its own
Your own Linux machine with Claude Code on it, working around the clock while your laptop is shut. From $3.49 a month.