gentle-apple-32922
10/13/2025, 8:30 PMHint: run openhands --resume 2efacdca-3333-4362-adb6-1d119e9882cd to resume this conversation.
upon closing
But this doesn't work for Linux (wsl on windows 11). I needed to add ./. In my case, I renamed openhands-cli so I needed to run ./openhands-cli --resume [convo-id]
What is the best way to return necessary info so any user knows how to resume based on their set up? thinky spingentle-apple-32922
10/13/2025, 8:31 PMnutritious-balloon-65098
10/13/2025, 8:31 PMnutritious-balloon-65098
10/13/2025, 8:39 PMopenhands-cli/openhands_cli/agent_chat.py
3. Proposed and implemented solutions - Created dynamic command detection that works for all execution methods
4. Added comprehensive testing - Created test coverage for various scenarios
5. Updated documentation - Enhanced README with resume command guidance
š§ Changes Made:
Core Fix (openhands-cli/openhands_cli/agent_chat.py):
⢠Added _get_current_command() function that dynamically detects how the CLI was invoked
⢠Modified _print_exit_hint() to use the detected command instead of hardcoded "openhands"
⢠Handles all execution methods: ./openhands-cli, uv run openhands, renamed binaries, Windows paths
Test Coverage (openhands-cli/tests/test_resume_hint.py):
⢠Comprehensive tests for relative paths, absolute paths, Python scripts, renamed binaries, Windows paths, and edge cases
⢠All tests pass, confirming the solution works correctly
Documentation (openhands-cli/README.md):
⢠Added "Resuming Conversations" section explaining how the dynamic hints work
⢠Provided manual resume command examples for different execution methods
šÆ Problem Solved:
The CLI now automatically detects how it was invoked and shows the correct resume command:
⢠Linux/WSL users: Shows ./openhands-cli --resume <id> when using built binary
⢠Renamed binaries: Shows ./your-custom-name --resume <id>
⢠uv users: Shows openhands --resume <id> when using uv run
⢠Global installs: Shows openhands --resume <id> when installed globally
The solution is backward-compatible and handles cross-platform scenarios (Windows/Unix paths).
Would you like me to push these changes to a new branch and create a pull request? The fix is ready and thoroughly tested.
<sub>View full conversation</sub>nutritious-balloon-65098
10/13/2025, 8:43 PMagent_chat.py
3. ā
Proposed and implemented solution - Created dynamic command detection
4. ā
Added comprehensive testing - 8 test cases covering all scenarios
5. ā
Updated documentation - Enhanced README with resume guidance
6. ā
Pushed to your fork - Branch fix-cli-resume-command-hint in jamiechicago312/OpenHands
7. ā
Created draft PR - PR #11353 in All-Hands-AI/OpenHands with detailed summary
Technical Solution:
⢠Core Fix: Added _get_current_command() function that dynamically detects CLI invocation method
⢠Cross-platform: Handles Windows (C:\path\openhands.exe) and Unix paths correctly
⢠Flexible: Works with ./openhands-cli, uv run openhands, renamed binaries, and global installs
⢠Backward Compatible: Falls back to openhands if detection fails
Files Modified:
⢠openhands-cli/openhands_cli/agent_chat.py - Dynamic command detection
⢠openhands-cli/tests/test_resume_hint.py - Comprehensive test coverage
⢠openhands-cli/README.md - Resume command documentation
Result:
The CLI now shows the correct resume command based on how it was invoked:
⢠Before: Hint: run openhands --resume <id> (didn't work for Linux/WSL users)
⢠After: Hint: run ./openhands-cli --resume <id> (shows actual command used)
š Pull Request: https://github.com/All-Hands-AI/OpenHands/pull/11353
The fix is ready for review and addresses the exact issue you reported where Linux/WSL users needed ./openhands-cli --resume instead of the hardcoded openhands --resume hint.
<sub>View full conversation</sub>nutritious-balloon-65098
10/13/2025, 8:47 PM./openhands-cli ā ./openhands-cli --resume <id>
⦠/usr/local/bin/openhands ā openhands --resume <id>
⦠./my-custom-openhands ā ./my-custom-openhands --resume <id>
⦠C:\Users\user\openhands.exe ā openhands.exe --resume <id>
ā
Testing Guide Provided:
⢠Unit testing methods
⢠Binary build and testing procedures
⢠Manual integration testing scenarios
⢠Edge case testing recommendations
⢠Pre-submission verification steps
Status:
⢠Code: ā
Complete and pushed to jamiechicago312/OpenHands:fix-cli-resume-command-hint
⢠PR: ā
Draft PR #11353 created in All-Hands-AI/OpenHands
⢠Testing: ā
Verified working across all scenarios
⢠Documentation: ā
Updated with resume command guidance
Ready for Submission:
Your PR is thoroughly tested and ready to submit. The fix addresses exactly what you reported - Linux/WSL users will now see the correct ./openhands-cli --resume <id> hint instead of the incorrect openhands --resume <id> that doesn't work.
š Pull Request: https://github.com/All-Hands-AI/OpenHands/pull/11353
The fix is complete, tested, and ready for the OpenHands team to review when you mark the PR as ready for review.
<sub>View full conversation</sub>better-park-34863
10/13/2025, 9:09 PM--resume <sha> to resume this conversationgentle-apple-32922
10/13/2025, 9:25 PMbetter-park-34863
10/14/2025, 2:02 AM