Go to main content
Team agent setupChoose · Review · Connect

Task handbook

Recipes for the connected developer

Complete procedures for multiple agents, optional resources, MCP authorization, local improvements, and verification evidence.

Use these recipes after the team publishes compatible signed rules. Keep native provider sign-in and hook trust within the selected agent.

01 / Task handbook

Inspect two agents on the same enrolled device

Use this recipe when you alternate between Claude Code and Codex. The device connection is shared. Each agent needs its own provider authentication and observed activation.

Prepare the first repository

  • Check macOS or Linux, Node.js 22 or later, and npm.
  • Obtain the approved setup distribution and personal enrollment command.
  • Choose the assigned working repository for both initial inspections.

Run the supplied setup command with both agents selected. Complete native sign-in in each agent. For Codex, open /hooks. Read and trust the Betterloop hooks.

This example selects both native agents. Use your personal enrollment command from the invitation.
npx @betterloop/setup setup --harness claude-code --harness codex

Open a fresh session in each agent. Use the same approved working repository for the initial comparison. Inspect each connection independently.

Set the repository path in both commands. Keep the two results as separate evidence.
betterloop doctor --harness claude-code --project /path/to/repository
betterloop doctor --harness codex --project /path/to/repository

Decide whether both are usable

Review native authentication, signed policy, activation, and required controls in each result. A working Claude Code session cannot establish Codex hook trust.

If one agent lacks a mandatory control, withhold acceptance for that agent. Review compatibility with the administrator. Retain the other agent’s independent result.

For Harbor Search, this means recording two search-api inspections. Shared enrollment establishes the device relationship; the separate records establish what each agent reports.

02 / Task handbook

Choose the correct knowledge match

Use this recipe when startup reports several matching project knowledge maps. Obtain the intended project identifier from the administrator. Confirm the affected repository.

A repository can appear in multiple signed maps. Choose the project that owns the intended knowledge. Do not select an unrelated project merely to clear a diagnostic.

Supply the configured PROJECT_ID and the repository that produced the ambiguous result.
betterloop sync --harness codex --project /path/to/repository --knowledge-project PROJECT_ID

Open a new session in that repository. Inspect doctor and knowledge retrieval diagnostics. The choice is remembered for this repository and enrollment.

Confirm that the selected knowledge index belongs to the intended project. If a referenced source still fails, inspect its separate authorization.

External Git, HTTPS, and MCP access remain source-specific. A knowledge match does not supply private credentials or automatically ingest the referenced document.

03 / Task handbook

Install a reviewed optional resource and retain its version

Use this recipe for a resource approved for developer self-service. Approval makes that version available for selection. It does not install the resource everywhere.

Team-required resources remain controlled by reviewed rules. Personal selections can tighten restrictions. Shared resource identities and permission limits still apply to those personal selections.

Inspect the prepared selection

The example org.review identity must be replaced with a real approved catalog identity.
betterloop library browser
betterloop library list
betterloop library show org.review

The read-only catalog session lasts ten minutes. Read the actual instructions, supporting files, dependencies, and exact version before copying the prepared local command.

For hooks, inspect the executable script and supported lifecycle event. For an MCP connection, inspect account authorization requirements before installation.

Apply it to the chosen agents

Use approved identity and version values. The library harness list separates agent names with commas.
betterloop library install org.review --version 1.0.0 --harness claude-code,codex
betterloop library status

Read the result for each agent. Complete any native sign-in or trust step it requires. Open fresh sessions if activation changed. Run doctor afterward.

The selection applies across repositories on this device for those agents. Library status describes local selection state. Later execution requires separate activity evidence.

Move to another approved version

The update version is illustrative. Choose the exact approved version offered by your connected catalog.
betterloop library update org.review --version 1.1.0 --harness claude-code

Selections remain pinned until an explicit update. Approved dependencies also use exact versions. Optional resources require Mimir 0.26.0 when Mimir is selected.

An organization approval change becomes available after reviewed team baseline adoption and publication. Run sync to receive that release.

If Claude Code succeeds and Codex fails, keep the working selection. Repair the Codex requirement. Repeat the resource operation only for Codex.

04 / Task handbook

Complete authorization for an approved MCP definition

Use this recipe after installing the connection definition. Obtain its exact approved server key. Select the agent whose account connection you need to inspect.

Replace KEY with the approved server identity for this selected agent.
betterloop mcp-auth-status --harness codex --server KEY
betterloop mcp-login --harness codex --server KEY

Complete the supported external sign-in. Check authorization status. Run sync. Run doctor. Repeat the resource update when its reported state needs refreshing.

Account authorization establishes access to the provider account. Tool permission and verified discovery still require their own checks under the applicable rules.

On macOS, the shared proxy stores OAuth tokens in Keychain. If Keychain fails, repair that issue. The connection does not use plaintext token fallback.

Authorization cannot be reused after its endpoint, issuer, resource, or approved scopes change. Complete the required new authorization rather than retaining incompatible account state.

Run this operation only when you intend to remove the selected server authorization.
betterloop mcp-logout --harness codex --server KEY

For example, Harbor might replace an approved service endpoint. Existing account access cannot establish authorization for the changed connection. Review and authorize its new definition.

05 / Task handbook

Decide what to do with a private improvement

Use this recipe with Claude Code or Codex native optimization. Drafts remain private and scoped to repository, runtime, and enrollment.

A draft can qualify through two distinct tasks. A correction with an existing explicit verification receipt can also qualify. Duplicate observations and candidates are deduplicated.

Use an existing candidate UUID from the local list before opening its private revision.
betterloop optimize --harness codex --action list
betterloop optimize --harness codex --candidate UUID --action review

Read the draft exactly as presented. Inspect its evidence and intended applicability. Decide whether it belongs only locally, should be dismissed, or merits shared review.

These are alternative decisions. Choose the one that matches your intent for the selected candidate.
betterloop optimize --harness codex --candidate UUID --action keep
betterloop optimize --harness codex --candidate UUID --action dismiss

Keeping or dismissing a candidate suppresses further notices for that candidate. A submitted revision remains immutable. A changed draft receives a new identity.

Review the separate submission before sharing

The terminal presents the bounded public content and requests confirmation before an upload.
betterloop contribute --harness codex --candidate UUID

Read the displayed public content separately from the private draft. Type submit only when you intend to upload those displayed fields.

The MCP bridge cannot make that submission automatically. Public fields exclude script bytes, private instructions, source, local paths, commands, and transcripts.

Assessment alone does not publish a lesson. A different human must approve the exact eligible revision. Signing and staged delivery follow that review.

06 / Task handbook

Verify candidate files before proposing a shared skill

Use this recipe only when the candidate has script and test files. Inspect inputs, dependencies, outputs, and side effects before running code.

Keep credentials out of script bytes and parameter defaults. Use the repository’s scripting runtime. Choose a test that evaluates the intended behavior.

Select an existing candidate and its meaningful test program. The staged test path depends on that candidate.
betterloop optimize --harness codex --candidate UUID --action stage
betterloop verify --harness codex --candidate UUID -- node tests/check.test.mjs

Stage copies the files into .betterloop/optimizations/UUID/revision-N/. It does not stage Git changes. It preserves different existing content rather than overwriting it.

Verification runs the explicit program directly in that directory. It does not invoke a shell. The two-minute timeout limits execution.

File bytes are checked before and after the run. Inspect the real result. A passing receipt binds the candidate digest to that verification.

A failed candidate check stays neutral. It is not reported as an attributed fleet failure. Script-backed submission requires a passing verification receipt.

Human reviewers still inspect the actual scripts through the ordinary repository pull request. A passing local command does not replace that review.

Prepare the reviewable variant after script review

Review the script files in the repository. Merge them after approval. Generate the Team Rules variant from the reviewed candidate.

This creates a proposed variant for review. It does not publish a skill.
betterloop optimize --harness codex --candidate UUID --action reference

Add the variant through the existing Team Rules Git review process. References pin repository identity, commit, path, digest, runtime, and parameters.

The server validates eligibility judgment and confirms that the digests match. Publication still requires review and signing. Script profiles require setup 0.5.0 or later.

07 / Task handbook

Create evidence for a lesson used in the session

Use this recipe only for a learning entry actually delivered in the current session. Exposure is neutral. It does not establish that the task succeeded.

Obtain the entry identifier and matching session identifier. Select a local check that evaluates the intended outcome of the work.

Substitute the exposed entry, its session, and a repository check that meaningfully tests the result.
betterloop verify --harness codex --entry ENTRY_ID --session SESSION_ID -- npm test

Run the verification command. Read its outcome. A passing receipt can support a later success report tied to that existing exposure.

An unrelated passing command cannot verify the task. Finishing a model turn cannot verify it either. A failed check alone does not establish lesson causality.

Describe the check that passed and its actual scope. These receipts are client evidence. They do not supply independent device attestation.

For Harbor search-api, the selected check should exercise the changed search behavior. A generic command that exits successfully would not substantiate that result.

08 / Task handbook

Resume delivery or change the enrolled team

Following a temporary outage

Refresh the affected repository when connectivity returns. Inspect the result immediately afterward.
betterloop sync --harness codex --project /path/to/repository
betterloop doctor --harness codex --project /path/to/repository

Read expiry, revocations, required controls, and resource readiness. Valid unexpired caches can continue during outages. Required invalid policy can deny supported actions.

Bounded queued events retry delivery. A delivery result cannot establish observation of every action during the outage. Keep that limitation in the incident record.

Moving to another organization or team

Obtain fresh enrollment for the intended connection. Explicitly disconnect the existing device authorization. Run the approved personal command for the replacement connection.

Open new agent sessions. Background work and MCP subprocesses retain their captured installation identity. Inspect each selected agent before resuming work.

Personal rules cannot relax shared restrictions. Catalog browser commands cannot install resources by themselves. Successful verification does not publish an improvement.

For an interrupted library operation, confirm process exit before clearing an abandoned empty lock directory. Rerun the operation only after that check.

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.