cloudflare / cloudflare/sandbox-sdk

Claude Code has high CPU usage spikes

Open
#416 0 comments 4 reactions 1 assignee Claimed by @aron-cf View on GitHub
enhancement
Dominant language
TypeScript
Stars
1.1k
Forks
114
Avg merge
22h 42m
Merged PRs (30d)
14

Description

I've been trying to run Claude Code in the sandboxes, but there appear to be long-standing issues with Claude Code, where it would suddenly spike in CPU usage and eat up an entire core. The session becomes completely unusable, and you have to kill -9 it from a different process.

I've had it happen more often than not when using standard-4 & opus, and it's better when using models like sonnet or haiku.

I know that this isn't a Cloudflare Sandboxes issue per se, but it could be nice to have some sort of built-in way to recover when that happens, especially since we're charged by compute. Otherwise, it becomes untenable to run the containers 24/7 if processes can go haywire. Not sure if you have run into this, but it appears to be a known issue for CC.
https://github.com/anthropics/claude-code/issues/19393

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.