Skip to content

Conversation

@stephanj
Copy link

Summary

  • Fixes agentbox start failing on macOS with error: [Errno 30] Read-only file system: '/run'
  • Updates host_config.socket_dir to detect platform and use $TMPDIR on macOS
  • Updates container.py to use centralized config instead of hardcoded path

Problem

On macOS, the /run directory doesn't exist (it's a Linux-specific path). When running agentbox start, the code attempted to create /run/user/{uid}/agentboxd which failed because:

  1. /run doesn't exist on macOS
  2. Even if it did, it would be read-only

Error message:

Syncing MCP servers from library...
Error: [Errno 30] Read-only file system: '/run'

Solution

The fix adds platform detection to host_config.socket_dir:

  • macOS (Darwin): Uses $TMPDIR (user-specific temp directory) or falls back to /tmp
  • Linux: Uses the standard /run/user/{uid} path
  • Both platforms: Respects XDG_RUNTIME_DIR if set

Additionally, container.py now uses the centralized config.socket_dir instead of hardcoding the path, ensuring consistency across the codebase.

Test plan

  • Tested agentbox start on macOS - container starts successfully
  • Verified container is running with agentbox info

🤖 Generated with Claude Code

On macOS, /run/user/{uid} doesn't exist and attempting to create it
fails with "Read-only file system" error. This fix:

- Updates host_config.socket_dir to detect the platform and use
  $TMPDIR on macOS instead of hardcoded /run/user/{uid}
- Updates container.py to use the centralized config.socket_dir
  instead of hardcoding the path

The fix respects XDG_RUNTIME_DIR if set on any platform.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant