Skip to main content
Mount a repository when you create a Session. Checkfu clones it into /workspace so the agent can use git normally, while keeping your token out of the agent’s container and attaching it only on outbound traffic to that repository.

Mount the repository

The token needs read access to the repository, plus write access if you want the agent to push. Set access: "read_only" on the resource to block pushes (see Create a session). The Session’s Environment must allow github.com. The default unrestricted networking does; under limited networking, add github.com to allowed_hosts. See Environments.

What the agent can do

origin points to the https://github.com/... URL, so git fetch, pull, and push work normally through bash. The initial clone is shallow (--depth 1). Checkfu attaches the token only to HTTPS requests targeting the mounted repository on github.com. Other repositories and api.github.com do not receive it, so the agent cannot open a pull request with it. Open the PR from your app after the push, or attach a GitHub MCP server to the Agent.

Rotate the token

GitHub App installation tokens expire quickly. To replace a token, set SESSION_ID to the live Session and NEW_GITHUB_TOKEN to the replacement token. Use the same SDK client and set repositoryUrl to the full URL of the mounted repository.
The next git request uses the new token. Archiving the Session discards both the clone and the token, so make sure the agent pushes before you archive.