claude-code - 💡(How to fix) Fix Cowork: Session provisioning fails with 'useradd: cannot create directory /sessions' [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#49208Fetched 2026-04-17 08:47:49
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Participants
Timeline (top)
labeled ×2

Error Message

RPC error: ensure user: useradd failed: exit status 12: user add: cannot create directory /sessions/amazing-youthful-hopper

Root Cause

Root Cause (likely)

useradd exit code 12 indicates the server cannot create the user home directory under /sessions/. This is typically caused by:

  • Full disk on the /sessions filesystem
  • /sessions directory not mounted or mounted read-only
  • Permission issue on the session provisioner

Code Example

RPC error: ensure user: useradd failed: exit status 12: user add: cannot create directory /sessions/amazing-youthful-hopper
RAW_BUFFERClick to expand / collapse

Bug Report

Service: Cowork (Claude's online agent workspace)

Error:

RPC error: ensure user: useradd failed: exit status 12: user add: cannot create directory /sessions/amazing-youthful-hopper

Symptoms

  • Every new Cowork session fails immediately after sending any message
  • Error appears consistently across multiple attempts
  • The Cowork service shows as "up" (HTTP responding) but session provisioning fails
  • Multiple consecutive "Initial greeting and session start" tasks all fail with the same error

Root Cause (likely)

useradd exit code 12 indicates the server cannot create the user home directory under /sessions/. This is typically caused by:

  • Full disk on the /sessions filesystem
  • /sessions directory not mounted or mounted read-only
  • Permission issue on the session provisioner

Impact

Cowork is completely unusable — no sessions can be started.

Reported by

User via Claude Code CLI on 2026-04-16.

extent analysis

TL;DR

The most likely fix is to investigate and resolve the issue causing the /sessions directory to be unwritable, such as a full disk, incorrect mount settings, or permission problems.

Guidance

  • Check the disk usage of the /sessions filesystem to determine if it is full and needs to be cleaned up or expanded.
  • Verify the mount settings of the /sessions directory to ensure it is mounted read-write and not read-only.
  • Investigate the permissions of the session provisioner to ensure it has the necessary permissions to create directories under /sessions.
  • Review system logs for any related error messages that may indicate the root cause of the issue.

Example

No code snippet is provided as the issue is related to system configuration and permissions.

Notes

The exact solution may depend on the specific system configuration and setup of the Cowork service. It is also possible that there are other factors contributing to the issue that are not immediately apparent.

Recommendation

Apply workaround: Check and fix the /sessions directory permissions and disk space to ensure the session provisioner can create user home directories. This is recommended because the error message specifically indicates a problem with creating the user home directory, suggesting a configuration or permission issue.

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