Repositories
Connect GitHub, select repository context, and understand how LegionCode scopes work to a branch.
A repository and branch define the starting point for a LegionCode task. Repository access is established through GitHub after you explicitly sign in.
Connect GitHub
Approved users can open the agents workspace and select Connect GitHub. Unapproved accounts return to the Cloud access page; approved accounts continue to repository selection.
LegionCode does not ask you to paste a GitHub token into the browser. Use the normal GitHub authorization flow and review the requested permissions before approving access.
Select repository context
Choose a repository and base branch before starting a task. That selection is attached to the run so the agent works from the correct source context.
Use the branch that should act as the task's base. A run creates its own isolated workspace, but it still needs an unambiguous repository and starting revision.
Keep tasks branch-specific
If two tasks need different base branches, create separate runs instead of changing repository context midway through one task.
Change context safely
Changing repository context affects subsequent work. Before switching:
- finish or stop the active task;
- review and preserve any required changes;
- select the new repository and branch;
- confirm the workspace header reflects the new context before starting another task.
Repository state and model-provider state are related through a workspace, but they are not the same credential boundary. GitHub authorization does not grant access to a model provider, and a provider key does not grant repository access.