claude-code - 💡(How to fix) Fix Scheduled tasks fail with 'useradd: cannot create directory /sessions/...' RPC error [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#48691Fetched 2026-04-16 06:53:38
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
labeled ×2

All scheduled tasks in Cowork Cloud are failing at sandbox provisioning — they never reach the task prompt. Error surfaces as Something went wrong in the UI with the following message:

RPC error: ensure user: useradd failed: exit status 12: useradd: cannot create directory /sessions/admiring-zealous-wright

The session directory name (e.g. admiring-zealous-wright) changes between runs, but the failure is the same — useradd cannot create the directory on the Cowork execution container.

Error Message

RPC error: ensure user: useradd failed: exit status 12: useradd: cannot create directory /sessions/admiring-zealous-wright

Root Cause

All scheduled tasks in Cowork Cloud are failing at sandbox provisioning — they never reach the task prompt. Error surfaces as Something went wrong in the UI with the following message:

RPC error: ensure user: useradd failed: exit status 12: useradd: cannot create directory /sessions/admiring-zealous-wright

The session directory name (e.g. admiring-zealous-wright) changes between runs, but the failure is the same — useradd cannot create the directory on the Cowork execution container.

Code Example

RPC error: ensure user: useradd failed: exit status 12: useradd: cannot create directory /sessions/admiring-zealous-wright
RAW_BUFFERClick to expand / collapse

Summary

All scheduled tasks in Cowork Cloud are failing at sandbox provisioning — they never reach the task prompt. Error surfaces as Something went wrong in the UI with the following message:

RPC error: ensure user: useradd failed: exit status 12: useradd: cannot create directory /sessions/admiring-zealous-wright

The session directory name (e.g. admiring-zealous-wright) changes between runs, but the failure is the same — useradd cannot create the directory on the Cowork execution container.

Impact

Affects all 5 of my scheduled tasks:

  • Memory sync (daily 23:00)
  • Outreach engine (10:00 + 14:00 Mon–Fri)
  • Morning brief (daily 08:30)
  • CRM weekly report (Mondays 09:00)
  • Tenders daily digest (daily 12:00)

The scheduler itself is working (cron fires on time, runs are recorded in the Runs panel), but every execution fails before Claude can start. Consecutive failed runs for Outreach engine:

  • 2026-04-14 21:18
  • 2026-04-14 22:23
  • 2026-04-14 22:32
  • 2026-04-15 10:02
  • 2026-04-15 12:33
  • 2026-04-15 14:02
  • 2026-04-15 18:09

First observed failure: ~21:18 on 2026-04-14 (UK time). Still ongoing as of 2026-04-15 18:09.

Environment

  • Platform: macOS Darwin 25.4.0
  • Claude Code model: Opus 4.6
  • Feature: Cowork Cloud scheduled tasks (with "Keep awake" toggle enabled; though the error is server-side so local state is irrelevant)

Expected

Scheduled tasks should execute on schedule.

Actual

Every run fails at useradd stage with exit status 12 — Cowork cannot provision the per-run sandbox directory under /sessions/.

Notes

  • This is an infrastructure/RPC error, not a user prompt or config issue
  • The task SKILL.md files on disk are intact
  • Local ~/.claude/scheduled-tasks/ is empty (these are cloud tasks, not local), which led to initial confusion — the MCP scheduled-tasks server returns 0 tasks while the UI correctly shows 5. May be worth clarifying the scoping in docs / tooling.

extent analysis

TL;DR

The most likely fix is to investigate and resolve the issue with the useradd command failing to create directories under /sessions/ on the Cowork execution container.

Guidance

  • Verify the permissions and ownership of the /sessions/ directory on the Cowork execution container to ensure that the useradd command has the necessary access to create new directories.
  • Check the disk space and storage capacity of the container to ensure that it is not full, which could prevent the creation of new directories.
  • Investigate any recent changes to the container's configuration, such as updates to the operating system or security policies, that may be causing the useradd command to fail.
  • Consider checking the system logs for any error messages related to the useradd command or directory creation to gain more insight into the issue.

Example

No code snippet is provided as the issue appears to be related to infrastructure and container configuration rather than code.

Notes

The issue seems to be specific to the Cowork Cloud infrastructure and the useradd command, and may require investigation and debugging of the container's configuration and system logs to resolve.

Recommendation

Apply workaround: Investigate and resolve the issue with the useradd command failing to create directories under /sessions/ on the Cowork execution container, as this appears to be the root cause of the problem.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING