wooden-umbrella-84098
09/22/2025, 11:23 AM❯ k logs -f runtime-omfgivmxtaopwrgu-5dbd957d65-hgj4p
INFO: Will watch for changes in these directories: ['/workspace']
INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
WARNING: --reload-include and --reload-exclude have no effect unless watchfiles is installed.
INFO: Started reloader process [37] using StatReload
🚀 Starting OpenHands SDK Server on 0.0.0.0:8000
📖 API docs will be available at http://0.0.0.0:8000/docs
🔄 Auto-reload: enabled
usage: openhands-agent-server [-h] [--host HOST] [--port PORT] [--no-reload]
openhands-agent-server: error: unrecognized arguments: -B -S -I -c from multiprocessing.resource_tracker import main;main(5)
usage: openhands-agent-server [-h] [--host HOST] [--port PORT] [--no-reload]
openhands-agent-server: error: unrecognized arguments: --multiprocessing-fork tracker_fd=6 pipe_handle=8wooden-umbrella-84098
09/22/2025, 11:31 AM--no-reload. We should probably default this to offwooden-umbrella-84098
09/22/2025, 11:32 AMwooden-umbrella-84098
09/22/2025, 11:33 AMno- prefix is magically inverting somethingwooden-umbrella-84098
09/22/2025, 11:33 AM--reload and default it to falsenutritious-balloon-65098
09/22/2025, 11:33 AMnutritious-balloon-65098
09/22/2025, 11:37 AM--reload flag logic as requested. Here's what was accomplished:
✅ Request Fulfillment Checklist:
1. Changed flag name: --no-reload → --reload
2. Reversed default behavior: default=True → default=False
3. Updated action: action="store_false" → action="store_true"
4. Updated help text: Now correctly indicates auto-reload is "disabled by default"
🔧 Changes Made:
The modification was made to `/workspace/project/agent-sdk/openhands/agent_server/__main__.py`:
- "--no-reload",
+ "--reload",
dest="reload",
- default=True,
- action="store_false",
- help="Disable auto-reload (enabled by default for development)",
+ default=False,
+ action="store_true",
+ help="Enable auto-reload (disabled by default)",
✅ Verification:
• Default behavior: Auto-reload is now disabled by default (reload=False)
• With --reload flag: Auto-reload is enabled (reload=True)
• Old --no-reload flag: Correctly rejected as unrecognized
• Code quality: All pre-commit checks passed (Ruff format, lint, PEP8, Pyright)
🎯 Result:
This change resolves the multiprocessing compatibility issues you encountered. The server will now start without auto-reload by default, eliminating the unrecognized arguments errors related to multiprocessing resource tracking. Users who want auto-reload for development can explicitly enable it with --reload.
Would you like me to:
1. Push the changes to a new branch and create a pull request?
2. Keep the changes local for now?
3. Follow any other specific Git workflow you prefer?
<sub>View full conversation</sub>wooden-umbrella-84098
09/22/2025, 11:39 AMnutritious-balloon-65098
09/22/2025, 11:39 AMnutritious-balloon-65098
09/22/2025, 11:40 AM--reload flag logic and default it to false. Here's the summary:
🔧 Changes Made:
• Flag name: Changed from --no-reload to --reload
• Default behavior: Changed from default=True to default=False
• Action: Changed from action="store_false" to action="store_true"
• Help text: Updated to reflect new behavior
🎯 Result:
• Default behavior: Auto-reload is now disabled by default (fixes your multiprocessing issues)
• Development usage: Developers can enable auto-reload with --reload flag
• Production ready: No more unrecognized multiprocessing arguments
📋 Quality Assurance:
• ✅ All pre-commit checks passed (Ruff format, lint, PEP8, Pyright)
• ✅ Argument parsing tested and verified
• ✅ Changes committed with proper co-authorship
🚀 Pull Request Created:
Link: https://github.com/All-Hands-AI/agent-sdk/pull/406
The PR is currently in draft status and includes comprehensive documentation of the problem, solution, and testing. This change will resolve the multiprocessing compatibility issues you encountered when starting the AgentServer via remote runtime.
<sub>View full conversation</sub>