◉CLAUDE LABJP
●2.1.310 — Monitor tool now works on Bedrock, Vertex and Foundry, and gateway failures are fixed (10/23)●2.1.307 — Fixes MCP failing to reconnect after sleep or a keychain lock (10/21). 2.1.306 also fixed the false claude -p login message●SONNET 4.5 — Retires on the Claude API on 11/30, 35 days left. Migrate to Sonnet 5.5●WINDOWS — Reports say hooks break silently only on Japanese-locale Windows; check the character encoding first●API — In API version 2026-10-21, passing temperature, top_p or top_k returns a 400 error●NEW — I Put a Ten-Line Promise File at the To…●2.1.310 — Monitor tool now works on Bedrock, Vertex and Foundry, and gateway failures are fixed (10/23)●2.1.307 — Fixes MCP failing to reconnect after sleep or a keychain lock (10/21). 2.1.306 also fixed the false claude -p login message●SONNET 4.5 — Retires on the Claude API on 11/30, 35 days left. Migrate to Sonnet 5.5●WINDOWS — Reports say hooks break silently only on Japanese-locale Windows; check the character encoding first●API — In API version 2026-10-21, passing temperature, top_p or top_k returns a 400 error●NEW — I Put a Ten-Line Promise File at the To…
Articles/Cowork
◈ Cowork/2026-10-26Intermediate

I Linted 36 Unattended-Run Prompts: All 7 'Use This Tool' Hits Turned Out to Be Bans

One permission dialog is enough to stall an unattended task, because nobody is there to click it. This note covers a lint script that counts prompt lines that tell the task to use such a tool, why a banned-word grep gave seven false alarms, and how matching on word stems fixed it.

Cowork58Scheduled Tasks19Unattended Runs3Prompt LintPython25

✦ Premium Article

One morning I opened the record of a task that was supposed to have run overnight and found it stopped halfway. There was no error. At the spot where it tried to read a single file, a permission prompt was still sitting on screen, and nobody had been there to press anything.

An unattended task has no one to click. One dialog ends the night. Since then I have put a one-line ban at the top of each scheduled prompt: do not call these tools. But once written, I had no way to check for omissions, or for a "use this tool" line that crept into a step I added later.

So I wrote a small script to lint the prompts. Its first version reported 7 suspicious files out of 36, and when I read them, all 7 were false alarms. Here is what happened, with the corrected code.

What counts as a risky line

The target is the set of tools that, in my setup, caused a stall when used unattended: AskUserQuestion, request_cowork_directory, request_access, allow_cowork_file_delete, computer use, and the file tools Read, Write and Edit. A prompt that tells the task to use any of them is the problem.

Which tools raise a dialog depends on your approval settings and client version. What follows is rule of thumb from my own environment, and your set may differ. If so, replace just two lines at the top of the script, DIALOG_WORDS and FILE_TOOLS.

The property to check is one thing: is there a line that names one of these tools without any negation next to it? I will have the machine confirm there is none. For how I decide where approvals land in the first place, see How I decide between Cowork and Claude Code: by where approvals land. This note is about what comes after: checking what you wrote.

Version one: a grep for banned words

The first version printed lines that contain a tool name but no negation word. My negation list was "禁止" (prohibited), "呼ばない" (do not call), "使わない" (do not use), "絶対" (absolutely), and so on.

NEGATION = re.compile(r"禁止|呼ばない|呼び出さない|使わない|使用しない|してはならない|絶対|NEVER|never")

I ran it over every file in the scheduled-task prompt folder. The result: 36 files, 15 with a ban header, 7 with suspect lines. That 7 made me brace. If seven files really told a task to use a dialog-raising tool, any night could stall.

✦

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
✦You can list every prompt line that tells an unattended task to use a dialog-raising tool, with one command, before the task runs
✦You can build the negation check on word stems before a banned-word grep starts missing conjugated forms like 使わず or 回避
✦You can stop a prompt with a leftover 'use this tool' line at the exit code of a pre-run check, instead of finding a stalled task in the morning
Secure payment via Stripe · Cancel anytime
✦

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Claude Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

Related Articles

◈ Cowork2026-10-22
Half My Scheduled-Task Logs Were Unreadable, So I Added One Mark Line Instead of Widening the Regex
Only about half of 1,076 daily log entries yielded a result. Widening the regex recovered 35 and raised false alarms, so I wrote a fixed one-line mark per run and a morning check script.
◈ Cowork2026-10-17
When a Scheduled Task Keeps Saying SUCCEEDED but Produces Nothing, Check Outbound Traffic in the First Minute
The run history is green, but the output file is still yesterday's. A short probe and a freshness check that tell you in the first minute whether outbound calls are being refused with a 403 on CONNECT.
◈ Cowork2026-10-25
The Build Stopped on 'Duplicate Resources' — 80+ Conflicted Copies Came From Build Output in a Synced Folder
An Android project inside Dropbox stopped building with a duplicate-resource error. This note covers a scan script that counts the conflicted copies, a pre-build guard that cleans only generated files, and how to exclude folders from sync.