◉CLAUDE LABJP
●2.1.295 — Hooks gain onFailure: "block", so a failed or timed-out hook no longer lets the action through●SONNET 4.5 — Retires on the Claude API on 11/30, 52 days left. Migrate to Sonnet 5.5●HAIKU 5.5 — Code written for Haiku 4.5 hits a 400 error on budget_tokens●Q&A — People are asking how to use one connector with two different accounts●API CACHE — Sonnet 5.5 cache reads drop to $0.10/Mtok (Oct 7)●NEW — Before halving always-loaded instruction files: sort what to keep, move, or delete●2.1.295 — Hooks gain onFailure: "block", so a failed or timed-out hook no longer lets the action through●SONNET 4.5 — Retires on the Claude API on 11/30, 52 days left. Migrate to Sonnet 5.5●HAIKU 5.5 — Code written for Haiku 4.5 hits a 400 error on budget_tokens●Q&A — People are asking how to use one connector with two different accounts●API CACHE — Sonnet 5.5 cache reads drop to $0.10/Mtok (Oct 7)●NEW — Before halving always-loaded instruction files: sort what to keep, move, or delete
Articles/Cowork
◈ Cowork/2026-06-21Advanced

Why Cowork's bash Says 'No Such File' When Finder Shows It Right There

Connect a cloud-synced folder to Cowork and bash sees empty placeholders while cat fails. Here is how on-demand materialization actually works, and the design patterns that keep your automations from silently dropping data.

Cowork43automation109Dropboxcloud syncbash5file management3scheduled tasks12

✦ Premium Article

Have you ever hit this contradiction in a Cowork automation? The scheduled run logs cat: settings.json: No such file or directory, yet when you open the very same file in Finder, the contents are right there. You connected the folder, but only bash insists the file is missing. This mismatch is not a glitch — it is the mechanics of a cloud-synced folder surfacing directly.

As an indie developer, once I started handing my personal automation over to Cowork scheduled tasks, I tripped over this "visible but unreadable" behavior more than once. The fix is simple once you understand the cause, but if you don't, it shows up in the worst possible form: a task that fails silently. This article takes the problem apart and turns it into design patterns that keep automation from dropping data.

Cloud sync leaves "files with no body"

Dropbox, iCloud Drive, OneDrive and the like use on-demand materialization to save disk space. The directory listing shows every file as if it were present, but the body — the actual bytes — often lives only in the cloud, with just a metadata placeholder sitting locally.

This is where Cowork's structure matters. Cowork's bash is a sandboxed Linux environment that reaches your connected folder through a mount. What bash sees is only "bytes that physically exist on disk." A placeholder shows up in a directory listing (ls), but the moment you cat it, there is no body, so it fails. The Cowork file tools (such as Read), by contrast, trigger a download from the cloud as a side effect of the read request. So for the same path there is an asymmetry: bash cannot request the body, while the file tool can.

That asymmetry is the whole story behind "Finder shows it but bash can't." Finder (and the sync client) kick off a download the instant a placeholder is opened; bash's cat has no such trigger.

Split the symptom into three states

Instead of lumping everything under "can't read it," observe the body's state in three buckets first — the right fix follows directly.

F="/sessions/xxx/mnt/Workspace/settings.json"
 
# 1. Does it appear in the listing? (metadata present?)
ls -la "$F"        # appears = placeholder exists
 
# 2. Does the body have bytes?
stat -c '%s bytes' "$F" 2>/dev/null || echo "stat failed"
 
# 3. Can you actually read it?
head -c 16 "$F" 2>&1 | head -1

You will typically see one of these three patterns.

Statelsstat sizecat / headMeaning
No bodyshowsfails or 0No such file / I/O errorUndownloaded placeholder
Zero bytesshows0returns emptyMid-sync / failed materialization
Stale bodyshowspositivereads, but old contentAnother device's edit not pulled yet

The third one — a stale body — is the scariest. cat succeeds, throws no error, but the content is not current. Automation treats the absence of an error as success and marches on, so results computed from old data pile up quietly. This is exactly why count checks and integrity checks belong downstream.

✦

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
✦Why the bash sandbox can only read files that are physically present, and how to tell on-demand materialization apart from a real error
✦A materialize-before-process design pattern built on the fact that bash VM paths and file-tool paths differ, with before/after code
✦A decision table for choosing how to read (direct bash, file tool, or copy-to-scratch) plus how to catch dropped data with counts and hashes
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 $15 for lifetime access
View Membership →

Related Articles

◈ Cowork2026-09-16
The scheduled task that only ran on days my desk was awake
Cowork scheduled tasks run remotely by default, but the moment one needs a local file or app, it runs only on your machine. Here is how the last field in the setup dialog decides that, and the three questions I now answer before creating a task.
◈ Cowork2026-09-15
What you keep the agent from walking matters more than what you hand it
Searching one connected Cowork folder for the same word gave three different answers. Here is what the default search silently left out, and how to measure a folder's scan scope once before you hand it over.
◈ Cowork2026-09-05
I verify what my Cowork memory claims instead of trusting its timestamp
Persistent memory keeps asserting whatever was true the day you wrote it. After an unattended job quietly read an empty folder for months, I stopped judging memory by its modification date and started attaching a verification step to every claim that can rot.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links