claude-code - 💡(How to fix) Fix [BUG] Cowork sandbox disk at 100% capacity — base image too large for allocated disk [2 comments, 3 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#52252Fetched 2026-04-24 06:12:07
View on GitHub
Comments
2
Participants
3
Timeline
5
Reactions
0
Author
Timeline (top)
labeled ×3commented ×2

Error Message

Error Messages/Logs

Code Example

Filesystem: /dev/sdc — Size: 9.8G, Used: 9.2G, Avail: 44M, Use%: 100%

Largest consumers in base image:
- /usr/lib/firmware: 1.2 GB
- /usr/lib/x86_64-linux-gnu: 832 MB
- /usr/lib/modules: 601 MB
- /snap/lxd + /var/lib/snapd: ~1 GB
- /usr/local/lib/python3.10/dist-packages: 718 MB
- /usr/local/bin/claude binary: 225 MB
- /var/lib/apt/lists: 289 MB
- /var/log/journal: 105 MB
- /usr/share/doc: 171 MB

User session files: only 4.7 MB
Cleanup blocked: sandbox user has no sudo, no_new_privileges enforced, all system paths root-owned.
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

The Cowork sandbox disk is at 100% capacity (9.2 GB used / 9.8 GB total, only 44 MB free) before any user work is done. The base image itself consumes virtually all available disk space, making the sandbox unusable for any task that requires writing files or installing packages.

What Should Happen?

The sandbox should have meaningful free disk space available for user work after the base image is loaded. A reasonable minimum would be 2-3 GB free.

Error Messages/Logs

Filesystem: /dev/sdc — Size: 9.8G, Used: 9.2G, Avail: 44M, Use%: 100%

Largest consumers in base image:
- /usr/lib/firmware: 1.2 GB
- /usr/lib/x86_64-linux-gnu: 832 MB
- /usr/lib/modules: 601 MB
- /snap/lxd + /var/lib/snapd: ~1 GB
- /usr/local/lib/python3.10/dist-packages: 718 MB
- /usr/local/bin/claude binary: 225 MB
- /var/lib/apt/lists: 289 MB
- /var/log/journal: 105 MB
- /usr/share/doc: 171 MB

User session files: only 4.7 MB
Cleanup blocked: sandbox user has no sudo, no_new_privileges enforced, all system paths root-owned.

Steps to Reproduce

  1. Open a Cowork session
  2. Run: df -h /sessions
  3. Observe disk is at 100% capacity
  4. Run: du -sh /* 2>/dev/null | sort -rh
  5. Observe that the base image alone consumes 9.2 GB

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

Unknown — discovered on April 23, 2026

Claude Code Version

Claude Cowork (desktop app)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Other

Additional Information

Account email: [email protected]

The issue cannot be resolved from within the session. The sandbox enforces no_new_privileges, sudo is blocked, and all reclaimable directories (APT cache, journal logs, package docs) are root-owned. A human engineer needs to either increase the disk allocation or reduce the base image footprint.

extent analysis

TL;DR

The most likely fix is to increase the disk allocation for the Cowork sandbox or reduce the base image footprint by removing or optimizing large components.

Guidance

  • Review the largest consumers in the base image, such as /usr/lib/firmware, /usr/lib/x86_64-linux-gnu, and /snap/lxd, to identify potential candidates for reduction or optimization.
  • Consider increasing the disk allocation for the Cowork sandbox to provide a minimum of 2-3 GB of free space for user work.
  • Investigate the possibility of removing or reducing the size of the /var/lib/apt/lists and /var/log/journal directories, which may be contributing to the high disk usage.
  • Evaluate the necessity of the /usr/local/lib/python3.10/dist-packages and /usr/share/doc directories in the base image, as they may be removable or reducible in size.

Example

No specific code snippet is provided, as the issue is related to disk space allocation and image optimization rather than code-level changes.

Notes

The issue is specific to the Cowork sandbox environment and the base image used, so any changes or optimizations should be carefully tested to ensure they do not introduce new problems or affect the functionality of the sandbox.

Recommendation

Apply a workaround by increasing the disk allocation for the Cowork sandbox, as this is a more straightforward and immediate solution to provide the necessary free space for user work. Reducing the base image footprint may require more extensive changes and testing.

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