quick-window-91705
09/04/2025, 8:29 PMnutritious-balloon-65098
09/04/2025, 8:30 PMnutritious-balloon-65098
09/04/2025, 8:36 PM_create_runtime):
◦ Clones the repository
◦ Checks out the specified branch using clone_or_init_repo(git_provider_tokens, selected_repository, selected_branch)
2. Microagent Loading Second (_create_memory):
◦ Loads microagents from the current workspace using get_microagents_from_selected_repo()
◦ Reads from .openhands/microagents/ directory in the checked-out branch
Technical Details
The process is implemented in `openhands/server/session/agent_session.py`:
• Line 135: _create_runtime() handles repository cloning with branch selection
• Line 156: _create_memory() handles microagent loading from the workspace
Since the repository is cloned and checked out to the selected branch before microagents are loaded, any branch-specific microagent configurations in .openhands/microagents/ will be properly loaded for that conversation.
This ensures that users get the correct microagents for their selected branch, allowing for branch-specific agent behaviors and configurations.
<sub>View full conversation</sub>