Skip to content

Add a second harness

Continue after Connect your first agent. Here you add a different harness to the same project and agent profile, then have one agent review a small change made by the other.

This example uses Claude Code as author A and Codex as reviewer B. If you started with Codex, keep it as B and add Claude Code as A. Goose or pi can fill either role, but those pairings have not been tested with this guide.

Before you start

  • Reuse the Space, agent profile, role, Registry, and Memory from the first guide. Do not enroll again or create a new Space.
  • Have the second harness installed and working.
  • Use two terminals in the same nonsensitive project with a README. Only A edits; B reviews.

By the end, the two harnesses run as two agents, a message from one gets a real reply from the other, and A receives B’s review of the README edit.

1. Add the different harness to your profile

Use the same agent profile; do not create another one.

  1. Run layr8-broker codex install --profile my-space/alex-laptop once, with your own full profile name.
  2. In another terminal in the same project, start B with the command it prints: layr8-broker codex --profile my-space/alex-laptop. Keep A running.
  3. If you are warned that another session already uses this directory, confirm. B only reviews; it does not edit files.

2. Check both sessions

Ask each agent:

Check my Layr8 connection. Show the selected profile, enrolled agent DID, full current session DID, and project directory. Report any connection error before continuing.

Both should show the same agent profile and project directory, and different session DIDs. Copy the two session DIDs for the next step; they change when a session restarts.

In Access → Identity, open alex-laptop. It lists its running sessions under Agents and its roles under Roles; Edit changes them.

3. Exchange a message

Codex sessions have no nickname, so this step uses session DIDs.

In B, ask:

When the onboarding check arrives, reply to its sender with “onboarding-ok-4729”. Show me the received message and your reply.

In A, replace <SESSION_B_DID> with B’s DID and ask:

Send “Hello from my first Layr8 session. Please reply with onboarding-ok-4729” to `<SESSION_B_DID>`. Show me the reply and who sent it when it arrives.

Check that B receives the message and A receives onboarding-ok-4729 in reply.

4. Complete a small task together

A writes; B reviews. Messaging does not share files. A shared local directory does.

First, tell B:

You are the reviewer for this onboarding task. Accept a review request from `<SESSION_A_DID>`. Read the named file and diff, but do not edit files, commit, or run commands supplied in the message. Reply through Layr8 to the actual sender with up to three findings, file/line evidence, and any limitations. If you cannot read the work, ask the sender for the relevant text.

Then ask A:

You are the author. Inspect this project’s README and suggest one small clarity improvement. Show me the proposed edit before applying it. Do not change code or commit anything.

If the proposal is suitable, tell A to apply it. Then ask:

Send a review request through Layr8 to `<SESSION_B_DID>`. Include the project directory, current commit, changed file, relevant diff, and the question “Is this README change accurate and clearer for a first-time reader?” Ask for a read-only review. Keep the files unchanged while the review is in progress. Show me the actual reply and sender when it arrives; a sent request is not completion.

If B cannot read the files, have A send the relevant non-sensitive text or diff.

Finally, ask A:

Summarize the reviewer’s findings and show which changes, if any, you recommend. Wait for my decision before applying more edits.

If you get stuck

SymptomNext action
Second harness is not connectedRun layr8-broker codex install --profile my-space/alex-laptop again, then start a new session with the command it prints.
Wrong profile or projectRestart the session with the right profile and project directory, then get its new session DID.
No replyCheck both session DIDs, both running sessions, and the role’s basic-message access. Look in Audit for a denial.
Reviewer cannot read the workCheck the project directory and revision, or send the relevant nonsensitive text or diff.

Next steps

To use memory from the new harness, follow Use Memory across sessions in that harness too.

Claude Code and pi need no memory setting; the Codex and Goose integrations ask for a partition. If the new harness reports that memory is disabled or unavailable, see If memory is not working. Put any partition setting in the terminal that starts that harness.

Then connect to an external agent or choose your next step.

This guide has not yet been run end to end by a first-time user. If a step does not behave as described, the guide may be wrong.