claude-code - 💡(How to fix) Fix Cowork: `RPC error: ensure user ... already exists unexpectedly` blocks new task creation [1 comments, 2 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#49433Fetched 2026-04-17 08:41:19
View on GitHub
Comments
1
Participants
2
Timeline
8
Reactions
0
Timeline (top)
labeled ×4cross-referenced ×3commented ×1

Creating a new task in Cowork fails immediately with an RPC error referencing an orphaned sandbox user. The task never reaches the model — sending any message (e.g. "estas ahi") returns the error before Claude responds.

Error Message

Algo salió mal RPC error: ensure user: user laughing-awesome-planck already exists unexpectedly: uid=1054 gid=1054 Puedes reiniciar la conversación desde un mensaje anterior.

Root Cause

Actual

RPC fails because the sandbox user laughing-awesome-planck (uid=1054 gid=1054) already exists from a previous task and was not cleaned up. The "Intentar nuevamente" button reproduces the same error.

Fix Action

Fix / Workaround

Environment

  • Claude Code version: 2.1.111
  • Platform: macOS (Darwin 25.3.0)
  • Surface: Claude Code desktop app — Cowork tab
  • Model selected: Opus 4.7
  • Account has many existing Cowork tasks in Dispatch (10+ visible in sidebar)

Workarounds tried

  • Full app restart (Cmd+Q + relaunch)
  • Renaming the task
  • claude doctor

Code Example

Algo salió mal
RPC error: ensure user: user laughing-awesome-planck already exists unexpectedly: uid=1054 gid=1054
Puedes reiniciar la conversación desde un mensaje anterior.
RAW_BUFFERClick to expand / collapse

Summary

Creating a new task in Cowork fails immediately with an RPC error referencing an orphaned sandbox user. The task never reaches the model — sending any message (e.g. "estas ahi") returns the error before Claude responds.

Error message (shown in UI)

Algo salió mal
RPC error: ensure user: user laughing-awesome-planck already exists unexpectedly: uid=1054 gid=1054
Puedes reiniciar la conversación desde un mensaje anterior.

Environment

  • Claude Code version: 2.1.111
  • Platform: macOS (Darwin 25.3.0)
  • Surface: Claude Code desktop app — Cowork tab
  • Model selected: Opus 4.7
  • Account has many existing Cowork tasks in Dispatch (10+ visible in sidebar)

Steps to reproduce

  1. Open Claude Code desktop app
  2. Go to Cowork → New task
  3. Name it "Check agent availability"
  4. Send any message (tested with "estas ahi")
  5. Error appears immediately; no model response

Expected

The task should create a fresh sandbox user and route the message to Opus 4.7.

Actual

RPC fails because the sandbox user laughing-awesome-planck (uid=1054 gid=1054) already exists from a previous task and was not cleaned up. The "Intentar nuevamente" button reproduces the same error.

Workarounds tried

  • Full app restart (Cmd+Q + relaunch)
  • Renaming the task
  • claude doctor

Notes

Suggests sandbox-user cleanup is not happening on task termination, so the uid slot stays bound to a stale username and collides on the next allocation.

extent analysis

TL;DR

The most likely fix is to implement a proper sandbox user cleanup mechanism to prevent uid collisions when creating new tasks in Cowork.

Guidance

  • Investigate the task termination process to ensure that sandbox users are properly cleaned up and their uids are released.
  • Verify that the claude doctor command is correctly configured to handle sandbox user cleanup.
  • Consider implementing a check to ensure that the uid is available before assigning it to a new sandbox user.
  • Review the error handling mechanism to provide a more informative error message when a uid collision occurs.

Example

No code snippet is provided as the issue does not contain sufficient information about the implementation details.

Notes

The issue suggests that the problem is related to the cleanup of sandbox users, but the exact implementation details are not provided. Therefore, the guidance is focused on investigating and improving the task termination and sandbox user cleanup processes.

Recommendation

Apply a workaround to manually clean up sandbox users and their associated uids until a proper cleanup mechanism is implemented. This can be done by reviewing the system's user management and removing any stale sandbox users that are causing the uid collisions.

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