Cowork sandbox recurring failure — useradd exit 12 / no space left on device (5 recurrences in a week, prior fix didn't hold)
Summary
My Cowork sandbox has failed to provision at least 5 times in the last week (22, 25, 26, 27, 28 Jul 2026), each time with:
RPC error: ensure user: useradd failed: exit status 12: useradd: cannot create directory /sessions/<name>
or the disk-full variant:
useradd: No space left on device
Each failure kills that day's scheduled work with no bash access and no error surfaced until I go looking for it.
Not a new bug
This matches the failure mode already described in these issues — all closed as stale/duplicate by the bot, not by a maintainer confirming a fix shipped:
- #36465
- #43850
- #56439
- #59856
Per #59856's diagnosis: the sandbox's ephemeral disks (~10GB each) fill because per-session /sessions/<name>/ directories are never garbage-collected, plus unbounded caches (Playwright Chromium downloads, systemd journal, npm cache). Once full, useradd can't create the next session's home directory, so no new session — including scheduled tasks — can start. The sandbox user has no sudo and can't clean any of it up itself; only a platform-side fix (GC old session dirs, cap the caches, or surface the failure with a recovery path) resolves it.
Timeline
I raised this internally on 26 Jul with a specific ask for a root-cause fix (not another workaround). It recurred again on 27 and 28 Jul — so whatever mitigation was attempted didn't hold, or the underlying GC gap in the platform is still there.
Ask
Please either:
(a) point to the actual fix/owner for the four issues above, or
(b) treat this as still open and share what's being done — it's now blocking real day-to-day work on a ~weekly cadence.
Happy to provide session IDs, timestamps, or logs on request.
Showing cached comments. Read the full discussion on GitHub ↗
4 Comments
Second independent report of this, on Claude Cowork (desktop, Windows 11).
My sandbox worked normally on 29 Jul 2026 and has failed to provision continuously
since 30 Jul, with the identical error on every attempt:
RPC error -1: ensure user: useradd failed: exit status 12:
useradd: cannot create directory /sessions/<name>
A full Windows reboot and an app restart both changed nothing, which is expected
given
/sessionsis server-side, but it does rule out the two obvious client-sideremedies. Unlike the intermittent pattern above, mine has not recovered between days.
It is inode exhaustion, not byte exhaustion
This may refine the diagnosis in #59856. Measured on 29 Jul, while the sandbox
still booted:
| Measurement | Value | Method |
|---|---|---|
| Inode table on
/sessions| 655,360 total, ~654,600 used, ~750 free |os.statvfs('/sessions')|| Free disk space at that moment | 3.4 GB free |
df -h|| Session directories at volume root | 814 |
os.listdir('/sessions')|| Readable by my session | 1 of 814 (my own) |
PermissionErroron the rest || My own session's footprint | 173 inodes |
find /sessions/<id> -xdev \| wc -l|So the volume ran out of inodes with gigabytes of space still free. That is
consistent with the never-garbage-collected diagnosis rather than contradicting it —
accumulated session trees full of small files exhaust the inode table long before the
bytes — but it means "the 10GB ephemeral disk fills" is not the whole mechanism, and a
fix that only caps cache size would not address it.
The 173-inode figure also bounds what any user can do about it: my own session, after
an unusually heavy day, accounted for about 0.03% of what was consumed. The rest sits
in other sessions' trees, which are unreadable and unreclaimable from inside a session.
The free-inode counter is not a usable warning signal
It reads zero continuously while most writes still succeed. A full 36-case test suite
passed with the counter pinned at 0 free inodes, sampled before and after each case.
So there is no threshold a user could watch to get ahead of this.
Higher-severity consequence:
tempfilesilently relocates to/tmpThis one is worth attention beyond the availability impact. Before the sandbox
fails to start, it enters a state where
/sessionscannot take a write — and in thatstate
tempfile.gettempdir()silently returns/tmpinstead of the session-localdirectory. Measured in both directions on 29 Jul: at 0 free inodes a direct write to
$TMPDIRfailed[Errno 28]andgettempdir()returned/tmp; after freeing 64inodes, the next call returned the session-local path again.
This is ordinary CPython behaviour —
_get_default_tempdir()tests each candidate in[TMPDIR, /tmp, /var/tmp, /usr/tmp]by creating a file and falls through on failure —so a correctly exported
TMPDIRprovides no protection. There is no exception, nowarning, and no change in return type; only the path changes.
At time of measurement
/tmpin the sandbox wasdrwxrwxrwt, ownernobody, with2,369 entries, 8 of them owned by other users. So once the fallback happens, any
fixed-name temp path becomes a live cross-session collision hazard, and code that
believes it is writing to a session-private directory is writing to a shared one.
That makes this a correctness issue and not only an availability one: it changes where
user data is written, silently, before anything visibly breaks.
Ask
Adding to the ask above — please also consider whether the failure can be surfaced
earlier than total provisioning failure. A message distinguishing inode exhaustion
from disk exhaustion would have saved considerable diagnosis time, and the silent
/tmpfallback means the degraded state is currently invisible to the user until itis total.
Happy to provide session IDs, timestamps or the full measurement transcript.
Independent confirmation, 11 Aug 2026, different account, Windows (Claude desktop, MSIX). Two weeks on from your report and the behaviour is unchanged, so adding evidence to keep this from going stale.
Live capture from inside the sandbox
Zero bytes available on
/sessions.ddof 20MB into my own session dir returns success but writes nothing:32 session directories going back to 3 July 2026, all
nobody:nogroup. Your point in the original report — that the sandbox user has no sudo and can't clean any of it up — holds exactly: unprivileged uid,sudoblocked, every stale directory unreadable.dufrom inside reports 4.5M total because it can't traverse them;dfsees the real 9.3G.Also confirming this is a byte-exhaustion problem specifically, not inode exhaustion —
df -i /sessionsshows 2% inodes used. And it is not the/filesystem: root still has 3.8G free, with/var/log/journalat 185M and/var/cache/aptat 133M, both well short of the levels reported in #59856. On this instance the leak is entirely in un-GC'd/sessions/<name>/.A narrower recovery on Windows than the one in circulation
On Windows the two sandbox disks are separate local VHDX files in
...\Claude\vm_bundles\claudevm.bundle\:rootfs(~9.8 GB) → mounts as/, 61% used, finesessiondata(~9.6 GB) → mounts as/sessions, the one at 100%So the recovery is quit Claude Desktop → delete
sessiondataonly → reopen. No reboot and no VM re-download.sessiondatahas no.originfile (unlikerootfs), so it's locally generated and just regenerates; connected folders are bind mounts to the real Windows filesystem, so nothing of the user's lives on it.Cheaper than deleting the whole bundle, but it is still a workaround on the same treadmill you describe — it buys weeks, then refills, because the GC gap is untouched.
Supporting your ask
Your question (a)/(b) is still the right one and still unanswered. #59856 was closed as duplicate in May without a maintainer confirming a fix shipped; #60029 and #72874 are both still open with the same root cause in different clothing. That's four issues describing one un-GC'd directory and no identified owner. A pointer to the tracking issue would be worth a lot here.
I am not using a windows machine
Duncan Wilde
Managing Director
DJ Wilde Consulting Limited
Mob : 07775503025
On Tue, 11 Aug 2026 at 7:13 pm, Tim Wortley @.***>
wrote:
I received the following from Anthropic's support:
That's the Cowork VM hitting an internal limit. It's the VM's own disk/state, not your computer's.
The reset path: in Claude Desktop, Help > Troubleshooting > Delete Cowork VM Bundle. This wipes the VM and pulls a fresh one on next launch. You'll lose the current Cowork session context, but your Claude conversations and account are untouched.
Newer Desktop versions handle this more gracefully, so Help > Check for Updates is worth trying first if you haven't recently. The Cowork guide at https://support.claude.com/en/articles/13345190 covers what the VM bundle contains.
I haven't tried yet because I am working OK using Claude on a different PC.
Good luck, and let us know how you get on.