Go to main content
Team agent setupChoose · Review · Connect

Developer guide

Bring a device into the team connection

Connect Claude Code, Codex, or optional Mimir and check the context selected for each working repository.

Enrollment belongs to your device and one organization/team pair. Each new repository session resolves the configuration and knowledge that apply there.

01 / Developer guide

Get the correct invitation and software

Use a macOS or Linux device. Check for Node.js 22 or later. Check that npm is available from the same terminal.

Read both installed versions before you run the connection command.
node --version
npm --version

Obtain the approved setup release from your administrator. A source build does not establish package publication. Use the distribution supplied for your deployment.

Confirm the organization and team named in the invitation. Read existing device status before replacing a connection or entering a new enrollment code.

This inspection identifies any device connection that already exists.
npx @betterloop/setup status

Turn an invitation into personal enrollment

A reusable team invitation opens without dashboard authentication. Provide your name and work email in the invitation form. Copy the personal setup command it provides.

The setup utility redeems a personal code. It does not redeem the shared invitation code. An administrator can issue a single-use personal code directly.

Keep that code private. Exclude it from repository files and shared terminal records. A valid device connection can add agents without another enrollment.

02 / Developer guide

Complete the device and agent steps

Run the supplied command

Run the personal command from the invitation or administrator. Select the agents you need. Use repeated --harness flags when selecting several agents.

Both selected agents use the same device enrollment in this example.
npx @betterloop/setup setup --harness claude-code --harness codex

An existing selected agent is reused. Setup requests confirmation before installing a missing selected agent. Read that request before accepting installation.

The --yes option accepts a missing-agent installation. Native sign-in and hook trust still require their own steps. Organization restrictions remain in effect.

Connect each provider account

Complete sign-in within each selected native agent. Betterloop does not import the Claude Code or Codex credential files.

Select Mimir only when you want its runtime. Claude Code and Codex connect directly. They can operate with Betterloop without Mimir installation.

Activate the integration

For Codex, open /hooks. Read the Betterloop hook definitions. Complete their native trust step. Start a new session after installation.

Reload plugins when your native host supports that operation. Activation is recorded after a supported hook runs. Plugin files alone do not establish activation.

Inspect the intended working repository

Substitute the actual repository path in the command. Select the agent you connected. Run doctor from the same device environment.

The example uses codex. Substitute the selected agent and an existing working repository.
npx @betterloop/setup doctor --harness codex --project /path/to/repository

Inspect software installation, provider access, signed cache, hook activation, and each required control. Repair a failed result before reporting that connection as ready.

A mandatory unsupported control prevents a fully governed result. For conditional controls, read the required trust and execution conditions with your administrator.

03 / Developer guide

Move between repositories with the same enrollment

Start a session in another working repository. Betterloop records that invoking repository at startup. It validates cached policy and resolves the applicable signed knowledge.

Repository facts, selected knowledge, readiness state, and fleet credentials remain separated by repository context. A result from one session cannot establish another session’s coverage.

An unapproved repository uses the organization setting. Report-only behavior omits company resources and bindings. Team-default behavior still omits company project knowledge without a match.

A missing or unresolved remote remains unapproved. Naming a local directory after an approved project does not approve that repository.

Resolve more than one knowledge match

Ask the administrator which configured knowledge project should apply. Supply its exact identifier for the intended repository. The selection is remembered for that repository.

Set the local path and the configured PROJECT_ID supplied for this repository.
betterloop sync --harness codex --project /path/to/repository --knowledge-project PROJECT_ID

A knowledge reference identifies a source. It does not supply access rights. External Git, HTTPS, and MCP sources retain their own authorization requirements.

Illustrative check: Harbor documentation and service code

A Harbor developer connects both native agents on one device. They complete sign-in separately. They review and trust the Codex hooks.

The developer opens search-api in Codex and checks doctor. They open the documentation repository in Claude Code and inspect that session separately.

Each session resolves its own applicable context. The service result supplies no evidence that the documentation repository has identical knowledge or control coverage.

To add an agent later, rerun setup for that agent. The device connection resumes. A different organization or team requires explicit disconnection and new enrollment.

If the signed runtime variant is unavailable, setup reports the dependency before consuming the personal code. Ask the administrator to resolve release compatibility.

04 / Developer guide

Repair the part that failed

If provider access expires, complete native sign-in for that agent. Keep the valid device connection. Recheck that agent with doctor after authentication.

Use sync when signed content needs refresh. Device disconnection revokes the entire connection. A release refresh does not require that broader operation.

Refresh the affected repository context while keeping the enrolled device connected.
betterloop sync --harness codex --project /path/to/repository

Use uninstall to stop Betterloop management of one agent. Use forget to archive one repository cache. Choose the operation that matches your intended change.

Uninstall preserves native model credentials and unrelated plugins. A revoked enrollment needs fresh authorization. Archived credentials cannot restore it.

A denied action can be the expected outcome of reviewed rules. Ask the rules owner to inspect the matching control and recorded reason.

For support, identify the agent, diagnostic category, and bounded reason. Remove personal enrollment codes, provider keys, private source, and terminal secrets before sharing.

Prepare your first rollout

Make setup a
team decision.

Bring a repository and a concrete requirement. Agree on the checks that will determine your next step.