diff --git a/openhands/runtime/base.py b/openhands/runtime/base.py index 6a2ce91a8f93..291c8f306304 100644 --- a/openhands/runtime/base.py +++ b/openhands/runtime/base.py @@ -274,7 +274,7 @@ def clone_repo( 'github_token and selected_repository must be provided to clone a repository' ) url = f'https://{github_token.get_secret_value()}@github.com/{selected_repository}.git' - dir_name = selected_repository.split('/')[1] + dir_name = selected_repository.split('/')[-1] # Generate a random branch name to avoid conflicts random_str = ''.join( @@ -313,7 +313,7 @@ def get_microagents_from_selected_repo( microagents_dir = workspace_root / '.openhands' / 'microagents' repo_root = None if selected_repository: - repo_root = workspace_root / selected_repository.split('/')[1] + repo_root = workspace_root / selected_repository.split('/')[-1] microagents_dir = repo_root / '.openhands' / 'microagents' self.log( 'info',