Fix runtime directory path for macOS compatibility #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
agentbox startfailing on macOS with error:[Errno 30] Read-only file system: '/run'host_config.socket_dirto detect platform and use$TMPDIRon macOScontainer.pyto use centralized config instead of hardcoded pathProblem
On macOS, the
/rundirectory doesn't exist (it's a Linux-specific path). When runningagentbox start, the code attempted to create/run/user/{uid}/agentboxdwhich failed because:/rundoesn't exist on macOSError message:
Solution
The fix adds platform detection to
host_config.socket_dir:$TMPDIR(user-specific temp directory) or falls back to/tmp/run/user/{uid}pathXDG_RUNTIME_DIRif setAdditionally,
container.pynow uses the centralizedconfig.socket_dirinstead of hardcoding the path, ensuring consistency across the codebase.Test plan
agentbox starton macOS - container starts successfullyagentbox info🤖 Generated with Claude Code