Linked repositories in one coding session
The new-session repository chooser groups repositories by existing Projects. The current Project group appears first, followed by other groups by name; repositories within each group sort by name. The current repository remains checked and cannot be removed. The same component serves native, web and Tauri.
By default, additional repositories must belong to the same canonical forge
origin and namespace as the current repository. GitHub personal owners count as
namespaces, too. GitLab uses the full parent namespace, including subgroup paths:
team/platform and team/payments are separate choices. Display labels,
Project-group names and repository names are not organization authority.
Standard public GitHub/GitLab SSH and HTTPS remotes resolve to the same forge origin. An SSH transport port does not become an HTTPS origin. Custom GitLab HTTPS server ports remain distinct; custom SSH-to-HTTPS correspondence without existing proof stays unknown. Unknown/local origins can link only within the same existing Project group. They do not enable arbitrary or ungrouped links. A known namespace mismatch cannot use the group fallback.
In Settings → Linked repositories, select organizations that may link across organization boundaries. Both the current and additional organization must be selected. Clearing all selections restores same-organization-only behavior. Settings list canonical identities from the signed-in owner's currently owned repositories; arbitrary domains, namespaces, actor IDs and foreign account IDs are not accepted. Saving uses a revision and rejects a stale replacement.
Disallowed repositories are hidden in the chooser. Saved groups, recommendations and newly imported repositories cannot reintroduce them through a bulk action. If a selected repository becomes disallowed while the form is open, continuation is blocked until the selection or settings are reviewed. The final server request and host launch-context read recheck the current policy, so a forged UI request or stale form cannot bypass it.
This policy does not grant repository ownership, team membership, Git credentials, Internet access or exemptions from account locks. Combined repositories still need compatible runtime/network policy, host and Git grants. Every attached repository retains its account restrictions. The policy applies to new launches and resume; it never stops or changes an active provider. A continuation cannot silently drop its retained repositories to evade a restriction.
CLI and operator API
devctl repository-links policy get
devctl repository-links inspect repository-id
devctl repository-links policy put --file policy.json
Use exact canonical organization IDs and the revision from the read:
{"revision":3,"crossOrganizationIds":["CURRENT_ORGANIZATION_SHA256","ADDITIONAL_ORGANIZATION_SHA256"]}
Replace both illustrative values with actual 64-character IDs. On HTTP 409, reread and preserve the intended selection; do not overwrite another client's change blindly. A lost mutation response requires readback before retry. There is no automatic retry or host reconfiguration job.
The existing operator catalog exposes GET/PUT /v1/preferences/linked-repositories
and GET /v1/repository-sets?primaryProjectId=.... The typed operator MCP helper
linked_repository_policy supports show, choices with the owned projectId,
and save with a complete policy. It retains the actual caller principal;
it cannot choose another owner or an arbitrary controller operation.
Managed sessions use get_linked_repository_policy({}), or native
devctl repository-links inspect without a Project argument. This returns only
the current repository's policy, not another repository's inventory. It cannot
save owner settings. Current MCP restrictions and native cached discovery still
apply; no provider restart or terminal input is needed to change server policy.