When disk space runs out, Claude Code can become unresponsive or crash without
clear feedback. This adds:
- New disk_space_utils.py module with:
- ENOSPC error detection (errno 28)
- User-friendly warning messages with remediation steps
- Disk space availability checking
- Safe file write/append helpers
- Updated security_reminder_hook.py to:
- Check disk space at startup and warn users proactively
- Detect disk space errors during state file operations
- Provide actionable guidance when disk issues are detected
The warnings include specific remediation steps (df -h, cleaning /tmp,
emptying trash, docker prune) to help users resolve the issue.
Slack context: https://anthropic.slack.com/archives/C07VBSHV7EV/p1770941952212839https://claude.ai/code/session_017ywHZBHvZasAWS6qcKXCb3