Skip to content

Repositories

Every project is backed by a Git repository — either one Crios creates for you on the built-in Git host, or an external repository you link. All agent work lands in Git, so nothing the agent produces is ever trapped inside the platform.

The built-in repository

If you create a project without linking a repository, Crios automatically creates a private repository for it on the built-in Git host at git.<domain> (powered by Gitea). The repository lives in your own account on that host, is named after the project (lowercased, plus a short suffix from the project's ID), and uses crios/main as its default branch. It behaves like any other Git remote: you can browse it in the web UI, clone it, and pull from it.

How agents use the repository

Agents never commit straight to a branch you work on. Crios keeps its own mainline, crios/main, in the repository:

  1. When a session first sets up its workspace, it clones the repository at the project's Default Branch. If the repository has no crios/main yet, Crios creates it from that branch and pushes it.
  2. Each session works on its own branch, crios/goal- followed by the first eight characters of the session's ID, created from the latest crios/main.
  3. As steps complete, Crios commits the work, pushes the session branch, and merges it into crios/main, which it pushes too. Several sessions of the same project can do this side by side; a merge conflict is retried when the session finishes rather than left half-done.

So crios/main always holds the latest work of every session, and any other branch — your main on GitHub, for example — changes only when you merge crios/main (or one of the session branches) into it yourself.

Within Crios, only the merge in step 3 writes crios/main. The agent is not meant to write it, or main or master, on its own: Crios checks the git push commands a session runs and refuses one to any of them (its own branch and any other branch still push), and no connection gives an agent a tool that merges a pull request. That check is not branch protection on the Git host, and the session's credential is not limited to particular branches (see What a session's credentials can reach).

Sessions don't open pull requests as part of their normal flow. When a session does open one on a GitHub repository — sessions started from an external intake ticket are asked to — its link appears as View PR on the session page and in the PR column of the project's Sessions tab.

What a session's credentials can reach

A session clones and pushes with a credential stored in its Git remote, where anything running in the session could read it. Crios therefore hands it the narrowest credential it can:

  • Built-in repository: the project's own account on the built-in host (named crios_p_…), a collaborator with write access to this one repository and nothing else. Crios creates it the first time a session starts, and deletes it with the project; the session's pushes are made as that account, not as you.
  • GitHub with the app: a token that works for the project's repository only and expires after about an hour. See GitHub.
  • GitHub device flow, GitLab: the organization's connected account or access token itself, which cannot be narrowed. Limit what that account or token can reach.

A built-in repository that Crios did not create for the project, such as one you pointed the project at yourself, is not opened to the project's account automatically: Crios has no authority of its own over it. One person has to let the project in, once, and it has to be a person who both administers that repository and manages the project (its owner, or an organization owner or admin). They do it by pressing Start on a session of their own in the project; the session must be one they created. Through the API that is POST /sessions/{id}/start with {"intent": "work"}, authenticated as that person (the app, or a personal API token): a start without intent only wakes the session and gives nothing. Crios then adds the project's account to that repository with their own access, and records it in the audit log (project.repository_bot_grant); the session's chat tells them so: "This project was given write access to … with your account".

Nothing else opens it. A session someone else restarts, a session a workflow or a schedule starts, a session an app connected through the Crios MCP server starts, a sandbox created directly through the API, and the first automatic start of a newly created session all start without access to that repository, and say so in the chat: "This session started without access to …". Without access, the session's agent does not run: it cannot clone a private repository, its workspace setup fails, and the session waits ("Workspace git setup failed"). Nothing is lost, and nothing can be done from inside that session. To fix it, the person described above presses Start on one of their own sessions in the project; if that session is still running, they press Stop first, then Start. After that, every session of the project can use the repository, whoever starts it, and a session that was waiting works once it is started again.

The access lasts as long as the project points at that repository. When the project's repository URL is changed to anything else, Crios removes the project's account from the previous repository (project.repository_bot_grant_revoked in the audit log), so pointing the project back needs the same person to press Start again. Deleting the project deletes its account, and its access with it. Pressing Start on your session in a project gives that project write access to the repository it points at, if it is one of yours: check the project's repository setting before you do it in a project you do not own.

Such a repository works for sessions only for now: publishing, publish rehearsals, applying a theme from project settings, and the project's code index read only the repository Crios created for the project, or a linked github.com repository. A project pointed at another built-in repository reports that its repository "was not created for this project" when you publish. Full support for it returns in a later release; until then, keep the repository Crios created, or link a GitHub repository.

Getting code out

You have several paths from a session to code on your machine:

  • Clone over HTTPS — clone the repository from git.<domain> exactly as you would from any Git host, and check out crios/main:

    git clone https://git.<domain>/<owner>/<repository>.git
    

    Your account on the built-in host mirrors your Crios account: the username is derived from your email address, and it uses your Crios password. If you sign in to Crios with SSO, ask your administrator how to reach the Git host.

  • Your own Git host — for a linked GitHub or GitLab repository, the crios/main and crios/goal-… branches are pushed there; open a pull request from crios/main into your default branch to review and merge the work with your existing tooling.

  • Pull request — when a session opened one, click View PR and review it like any other.
  • Artifacts and downloads — generated files (reports, exports, archives) are downloadable directly from the session; see Previews & artifacts.

To move a project off Crios entirely, including its data, see Moving a project out of Crios.

Linked external repositories

Instead of the built-in host, a project can point at an existing GitHub or GitLab repository (when the connector is configured for your organization). The agent's process is the same — session branches merged into crios/main — but the branches appear on your external host, alongside your existing CI and review tooling. Repository selection, permissions, and the GitHub App installation are covered in GitHub integration; the shared access token and repository picker behind the GitLab kind are covered in GitLab.

The project's owner or an organization admin can change the repository URL later in project settings; editors see the field read-only. The URL must be an https:// address of one repository, without a user name, password, query or fragment, and each change is recorded in the audit log. Editors can still change the default branch.

Publishing reads a project's own built-in repository or a repository on github.com. A GitLab project, or one on any other host, runs sessions as before but cannot be published from Crios.

Note

Changing a project's repository mid-flight doesn't migrate history. If you need to move from the built-in host to GitHub, push the built-in repository to GitHub first (git push --mirror), then update the project's repository URL.

Default branch

The project's Default Branch setting (usually main) is the branch Crios clones when it first sets up a session's workspace, and the one crios/main starts from in a linked repository that doesn't have it yet. Keep it in sync with the actual repository — if the branch named here doesn't exist, sessions can fail early when cloning. A built-in repository's default branch is crios/main itself.