> Index of all Nori docs pages for agents: https://docs.noriagentic.com/llms.txt · Ask a question: https://noriagentic.com/ask

# Use GitHub with Nori sessions

Sessions reach GitHub through the **Jiro (by Nori)** GitHub App. Each session gets a short-lived token scoped to the repositories the app installation can see. `git` and the GitHub CLI (`gh`) are preinstalled on every machine and use that token.

## Who can use it

| Who                        | What they can do                                                                                                                                                   |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Org admins                 | install, reinstall, or remove the app; save a personal access token (PAT); change the GitHub security settings; set the default agent for `@nori` on pull requests |
| GitHub organization owners | change which repositories the installation can see; accept new app permissions; unsuspend the installation                                                         |
| Org members                | connect their own GitHub account, when the org allows it                                                                                                           |

## Install the app

- Dashboard: **Integrations → GitHub → Install GitHub App**.
- CLI: `nori-sessions integrations github add-url` returns a one-use install link that is valid for 10 minutes. An org admin opens it.

Check the result with `nori-sessions onboarding status`. The `github` object should show `installed: true, configured: true`.

Repository access follows the installation’s repository selection on GitHub. Nori keeps no allowlist of its own. To change it, a GitHub organization owner uses **Update repository access** on the GitHub card. A PAT saved on the same card (**Save PAT**) is used ahead of the app for every repository.

## App health

Nori checks the installation periodically and whenever the Integrations page opens. The GitHub card shows a problem when one exists. The CLI shows it as `github.installationProblem` in `nori-sessions onboarding status`:

| State                 | What to do                                                                                                                                                    |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Uninstalled on GitHub | an org admin clicks **Reinstall GitHub App**, or opens a fresh `add-url` link. Do not use **Update repository access**: it points at the deleted installation |
| Suspended on GitHub   | a GitHub organization owner unsuspends the installation on GitHub                                                                                             |

**Remove GitHub App** on the card disconnects the app from this Nori organization. If another Nori organization manages your installation, its admins manage these actions.

## What sessions may do

Every session can write code, pull requests, issues, projects, discussions, and merge queues, dispatch existing workflows (`gh workflow run`), and read CI status, deployments, packages, and security alerts.

An admin session is one started by an org admin, or one with an approved `!admin` request. Two settings in **Settings → Security → GitHub** widen what admin sessions can do:

| Setting                                                                     | Default                  | Effect on admin sessions                                                                                                                                |
| --------------------------------------------------------------------------- | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Allow admin sessions to administer GitHub repositories and the organization | off                      | manage repository settings, collaborators, org membership, webhooks, Actions variables, deployments, environments, Pages, packages, and security alerts |
| Allow admin sessions to edit GitHub Actions workflows                       | on for new organizations | push changes under `.github/workflows/`                                                                                                                 |

Both stay within the app’s installed permissions and apply to running sessions. Pushed workflow files run with repository secrets, so keep branch and deployment protections in place.

If a push that changes a workflow is refused for a missing `workflows` permission, turn on the workflows setting and approve `!admin` for the session. If GitHub still refuses, a GitHub organization owner must accept the app’s updated permissions.

## Signed commits

`nori-git` publishes commits that GitHub signs:

| Command                                  | What it does                                                  |
| ---------------------------------------- | ------------------------------------------------------------- |
| `nori-git commit <git commit arguments>` | commit with Git hooks, then publish                           |
| `nori-git publish`                       | publish pending history, or resume an interrupted publication |
| `nori-git status`                        | show pending commits and recovery records without publishing  |

**Settings → Security → GitHub → Require signed commits on every push** is off by default (CLI `nori-sessions fleet set-setup --github-signed-commits true`). When it is on, sessions refuse to push commits GitHub has not verified. When it is off, a plain `git push` works. Repositories whose own rules require signed commits still reject unsigned pushes.

## Pull requests under your own name

By default, sessions act on GitHub as the Nori app. To have your sessions act as you:

1. An org admin turns on **Let members connect their GitHub account so their sessions act on GitHub as them** in **Settings → Security → GitHub** (CLI `--github-user-attribution true`).
2. You open **Integrations → GitHub → Your GitHub account** in a signed-in browser and approve GitHub’s consent screen.

Sessions you start, and your personal automations, then open pull requests, comment, and review as you, with the app badge. A single commit is signed as you. Longer histories are published as the app, with you as co-author. Sessions other people start, and shared automations, still act as the app. In a shared Slack thread, the person who started it acts for everyone. Check or remove the connection with `nori-sessions integrations github-user status` or `disconnect`.

Availability: this feature is being rolled out and may not be enabled for your organization yet.

Without it, you can store a fine-grained personal token as a personal [environment variable](https://docs.noriagentic.com/sessions/guides/environment-variables/) named `NORI_USER_GITHUB_TOKEN`. It needs **Pull requests: read and write**. Agents use it only to open pull requests as you. `GH_TOKEN` is a reserved name.

## Multiple GitHub accounts

An org can connect several GitHub App installations and labelled PATs, choose which sessions or agents get each one, and set a default. Use **Integrations → GitHub → Add another GitHub account**, or the CLI: `nori-sessions integrations github list|add-url|add-installation|add-pat|set-scope|remove|health`. Removing an app account revokes its session tokens. Nothing is uninstalled on GitHub. Availability: this feature is being rolled out and may not be enabled for your organization yet.

Each account row shows its health:

| Row status               | Meaning                                                                                   |
| ------------------------ | ----------------------------------------------------------------------------------------- |
| Connected                | the account works                                                                         |
| Suspended on GitHub      | a GitHub organization owner must unsuspend the app. Other accounts keep working           |
| Uninstalled on GitHub    | reinstall the app on that account                                                         |
| Token rejected by GitHub | a PAT expired or was revoked. The row says “GitHub rejected this token…”. Replace the PAT |

Nori checks every PAT about every 45 minutes and when the Integrations page opens, including orgs that have only PATs. A rejected PAT is no longer used, so its owners fall back to the app accounts. A GitHub outage or rate limit does not mark a PAT as broken.

In **Settings → Environment → Workspace**, a workspace repository shows a hint when no connected account covers its owner, its account has a problem, its app account was not granted that repository, or its account is not given to every session (new machines then cannot clone it before a session starts). **Add from connected GitHub accounts** lists each app account’s repositories under the account’s name; pick one to add its clone URL.

## Mention `@nori` on a pull request

Comment `@nori <request>` on a pull request, in an inline review comment, or in a review summary. Each pull request has one ongoing conversation. A new mention while a turn runs cancels that turn and runs next. Reactions on your comment show progress, and the reply posts as a top-level PR comment. Edited comments, bot comments, and comments on plain issues do not start work.

To use it:

- An org admin enables event intake: `nori-sessions integrations github-events enable` (`status` and `disable` also exist).
- You must be an org member with your GitHub account connected (see above), and have write, maintain, or admin permission on the repository.

Commands, placed at the start of the comment:

| Comment                   | What it does                                                                                                       |
| ------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| `@nori !provider`         | show the current provider and the choices                                                                          |
| `@nori !provider <id>`    | switch provider. The next mention runs on it                                                                       |
| `@nori !model [id]`       | list or switch the running conversation’s model                                                                    |
| `@nori +handle <request>` | on a PR’s first mention, start on that [custom agent](https://docs.noriagentic.com/sessions/guides/custom-agents/) |

Text after a command runs as a request once the command succeeds. Other `!` commands are not available on GitHub.

A PR conversation’s machine is limited to that pull request’s repository. It can read the code, the pull request, and its CI results: commit statuses, check runs, and workflow runs with their logs. If the app installation has not granted Checks, Commit statuses, or Actions read access, Nori leaves that part out and the rest still works.

Admins set the agent new PR conversations start with: `nori-sessions integrations github-events defaults set --agent <handle>`, or `--provider`, `--model`, `--skillset`, and `--size`. `defaults clear` returns to the fleet defaults. Existing PR conversations keep their agent.

## Common questions

**Git says `Repository not found`, but it worked before.** The app may have been uninstalled or suspended. Check the GitHub card or `nori-sessions onboarding status`.

**Can a session merge pull requests?** Code write access also allows merges and releases. Use branch protection to limit them.

**Why are my PRs authored by the bot?** Your account is not connected, the org has not turned attribution on, or someone else started the session.

**Why didn’t `@nori` respond?** Event intake may be off, your GitHub account may not be connected, or you may lack write permission on the repository.

**Can Nori read my pull request’s CI results?** Yes. Every session can read CI status in the repositories the app covers, and a PR conversation can read its pull request’s commit statuses, check runs, and workflow logs (see [Mention `@nori` on a pull request](#mention-nori-on-a-pull-request)).

**Can I use a PAT instead of the app?** Yes. Save it on the GitHub card or with `nori-sessions integrations set-github-pat`. It replaces the app token for every repository it covers.
