Inspect

Repositories

Adding a repository lets Inspect start sessions against its code and prepare a reusable environment with its dependencies installed. Repository configuration controls the base branch, setup scripts, and environment variables used for that work.

Add a repository

You need the Add repositories or Edit repositories role. The Inspect GitHub app must have access to the repository before you add it.

  1. Open Repositories and choose Add repositories.
  2. Select the repositories to connect, then confirm with Add repositories.
  3. Inspect starts an onboarding session for each repository you add.

Inspect initializes Base branch from the repository's default branch in GitHub. You can change Base branch in repository settings with the Edit repositories role. Builds clone this branch, so it must exist in the repository.

If adding a repository fails with “Grant the Inspect GitHub app access to this repository,” check the repository URL and the GitHub app installation's repository access. Access through your personal GitHub account does not replace access for the app.

See Users and roles for repository management permissions.

Repository instructions

Commit repository-wide guidance in an instruction file at the repository root. Inspect selects the first readable file in this order:

  1. AGENTS.override.md
  2. AGENTS.md
  3. AGENTS.MD
  4. CLAUDE.md
  5. CLAUDE.MD
  6. REVIEW.md

These are alternatives, not files that Inspect combines. Inspect also loads .inspect/AGENTS.md when it exists. That file applies across the repository and takes precedence over conflicting guidance in the selected root file.

The agent receives the selected files as repository-scoped context, including their paths and an instruction version. An initial snapshot can come from onboarding or an image build and may be stale. Inspect refreshes instruction context from the session checkout; the agent is instructed to reread relevant guidance after branch changes or instruction-file edits. Context is restored after conversation compaction or workspace recovery rather than repeated on every message.

Each automatically loaded file has a 16 KiB limit. Inspect marks larger files as truncated and tells the agent to read the full file before relying on it. Unreadable files, files that resolve outside the repository, and files that change during the read are reported as unavailable; Inspect can fall back to the next readable root file.

For guidance that applies to a subdirectory, add a nested instruction file there. The agent looks for nested guidance along the paths it works on and applies it within that directory's scope. Nested files are discovered as needed, rather than included in the root instruction snapshot.

Prepared environments

Inspect can restore a prebuilt repository image instead of installing dependencies from scratch for every session. The image includes the checkout and the results of setup scripts. Configure repository builds for toolchains and dependency installation, environment variables for process configuration, and egress secrets for HTTP credentials that should stay outside the sandbox.