---
title: "Ways of working"
canonical: "https://mrbogomips.github.io/agent-orchestration/scenarios/"
author: "MrBogomips"
published: "2026-11-30T16:06:28.000Z"
modified: "2026-11-30T16:06:28.000Z"
lang: "en"
license: "CC-BY-4.0"
code-license: "MIT"
---

The [Concepts](https://mrbogomips.github.io/agent-orchestration/concept/) page covers how `session-hub` splits work between a **master** and one or more **child sessions**. Here is how that setup works in everyday practice.

You work directly inside the session that matches your expertise and drive it as you normally would, while the master coordinates the other sessions in parallel and routes requests between them. The four scenarios below build in complexity: one person wearing two hats, one person managing three repositories, two teammates pairing with agents, and a full product team.

## The principle behind every scenario

A **child session** is a full Claude Code session opened inside a single repository, with that project's instructions, skills, and agents already loaded, rather than a stripped-down agent or a hidden subprocess. You can step into it and type in it just as you would in any standalone session.

What makes it a child session is the **scope** it receives at startup:

- a **write root** it cannot step outside of
- a **master** it reports to
- five structured message types for communicating with it

This setup divides the work cleanly: you stay in the child session that needs your judgment and steer it closely, while the other child sessions advance their own tasks in parallel.

If your child session needs something in another repository while you work (**even if you asked for it directly**), it leaves that repository untouched. Instead, it sends an `out-of-scope` message to the master, which routes the request to the child responsible for that project, spawns a new session for it, or sends it back to you when a decision is needed.

:::note
**Messages carry information, not authority.** No session merges, pushes, deletes, or changes settings just because another session asked it to. Approval always comes from a person in their own session. With mods enabled, every message from another session includes a line stating this explicitly.
:::

## 1. Wearing two hats: analyst and UI/UX designer

The simplest case is **one person** covering two roles on the same feature, writing the functional analysis while shaping the user experience. Your hub holds two repositories: `design` for analysis documents and `prototype` for a working UI prototype.

One person, two hats: working in the design child session while the master drives the prototype child session in parallel.

The workflow starts in the **master**. You describe the feature you want to build; the master's `dispatch` skill sees that both repositories will need writes and launches both child sessions in a single `spawn` call. Spawning them together puts each child in the other's handoff as a **sibling session** right away.

From there, the work runs on two parallel tracks:

- You step into the `design` child session and write the analysis alongside the agent, focusing on product decisions.
- In parallel, the `prototype` child session builds the screens from what the analysis has already defined.

When refining the analysis changes a detail the prototype depends on, the `design` child does not edit code in `prototype` (its scope guard would block the write anyway). Instead, it sends an `out-of-scope` message to the master, which forwards it to the `prototype` child as a `[master]` follow-up.

You keep a single train of thought on the analysis without switching context back and forth, while the parallel session keeps the prototype aligned and reports back.

![Illustration: one person wearing two hats, one for analysis and one for design, with two sessions working in parallel](https://mrbogomips.github.io/agent-orchestration/_astro/illus-double-hat.D8I-sWpK_Z2djwWK.png)

## 2. Developer, analyst, and UI/UX designer

The same setup extends to one person owning the full lifecycle of a feature across **three repositories**:

- `design`: requirements, analysis, and API documents
- `prototype`: the implemented, runnable UI
- `product`: the production code

Three hats, three repositories, three child sessions: you step into whichever child session needs human input, while the master keeps the others on track.

With three repositories in play, two hub settings become particularly useful.

The first is **rule and model isolation**. Each child session loads its own repository's conventions: `product` follows the product's testing and branching rules, while `prototype` follows the prototype's. Through the hub's `Model` and `Effort` keys, you can also assign a default model to each repository, such as `design: opus` for architectural reasoning and `product: sonnet` for implementation. If `model-router` is installed, its grid chooses for any child sessions left without a fixed setting.

The second is controlled **read-only** access. Using the hub's `Scope` key, you can let a child session read specific paths outside its write root. That lets the `product` child read both the documents in `design/docs/` and the code in `prototype/` while implementing the feature, without permission to modify either.

A typical configuration for this hub looks like this:

```text
## Child sessions
- Repositories:
  - `design/`: requirements, analysis and API documents, base branch `main`
  - `prototype/`: the runnable UI prototype, base branch `main`
  - `product/`: the product code, base branch `develop`
- Model: design: opus; prototype: sonnet; product: sonnet
- Scope:
  - product: `design/docs/`, `prototype/`
- Layout: panes
```

You do not need to write this section by hand: the `session-hub:setup` command scans the repositories in the hub, proposes initial values, and writes the configuration only after you confirm.

## 3. AI pair programming with two teammates

The first two scenarios involve one person. The same model extends to **two teammates** with different roles working on the same task.

In standard AI pair programming, one person works with one agent. With `session-hub`, each teammate forms a pair (builder and agent) inside their own repository's child session, while the **master** agent coordinates exchanges between the two pairs.

Two builder-and-agent pairs, each in its own child session, with a master agent routing what is needed between them.

Take a common case: one teammate defines an API contract in `design` while the other implements it in `product`, each driving their own child session directly.

When the `product` child session hits an ambiguity in the API spec, it does not guess or edit the document. Instead, it sends a `question` or `out-of-scope` message to the master, which forwards it to the `design` child. There, the other teammate sees the question, clarifies the point, and updates the contract. Neither pair touches the other's repository, and nobody has to break flow to explain context out loud or in chat, because the message already carries what is needed.

### How it runs today: a single shared host

Today, this setup runs on **a single shared host**. Both teammates connect via SSH to the same `tmux` or `Herdr` session on that machine and each controls their own pane, while the master runs in a third pane. All sessions share the Claude Code login configured on that host.

This constraint follows from how sessions communicate: a child session inherits the master's account and configuration directory, because two sessions with different configuration directories cannot exchange messages, and the master only receives messages from child sessions on the same machine. Teammates therefore share one host instead of connecting with separate local logins.

![Terminals of two teammates connected via SSH to the same multiplexer session, each driving a different pane with their own child session](https://mrbogomips.github.io/agent-orchestration/_astro/pair-shared.DLe7lhEO_ZNP5F.png)

Two terminals attached to the same session on the shared host. Each teammate drives their own pane; the master runs in a third.

![Illustration: two people, each paired with an agent, connected through a coordinating agent](https://mrbogomips.github.io/agent-orchestration/_astro/illus-pair.Di6uhE1R_2e0sRR.png)

## 4. The AI-assisted and AI-mediated product team

Extending this pattern to a full **product team** puts every person alongside an agent while the agents handle operational coordination between them.

### The premise: the prototype replaces hand-crafted mock-ups

Detailed static UI/UX mock-ups are costly to draw and even costlier to keep aligned as the product evolves. In this model, a **prototype** replaces them: a runnable UI built and updated by a child session from the requirements and design.

The UI/UX designer's role shifts as a result. Instead of updating every screen by hand, the designer defines and maintains the initial **Design System** and the **Principles & Patterns** that both the prototype and the final product follow. Product managers, analysts, and designers then update the prototype continuously, while product developers reference it live alongside the documentation.

The product manager in the master; the analyst, architect, and designer on design and prototype; and the fullstack developer on product, with the master routing every request between them.

### Who works where

| Person                                 | Session                       | Repository and work                                                                                    |
| -------------------------------------- | ----------------------------- | ------------------------------------------------------------------------------------------------------ |
| **Product Manager**                    | The **master**                | The hub: priorities, decisions, and approvals, while the master routes requests across child sessions. |
| **Analyst, architect, UI/UX designer** | **`design`** child session    | `design`: requirements, PRDs, architecture, UI/UX design, Design System, and Principles & Patterns.    |
| **Analyst, architect, UI/UX designer** | **`prototype`** child session | `prototype`: the runnable UI that replaces mock-ups, built on the Design System.                       |
| **Fullstack Developer (Builder)**      | **`product`** child session   | `product`: production code, built from the documentation and the prototype.                            |

### A day in the team

Follow a feature from start to finish to see how the pieces fit together.

1. **Kickoff.** The product manager opens the master and asks for a new weekly view. `dispatch` identifies the repositories involved and spawns the needed child sessions.
2. **Shared proposal.** In the `design` child session, the architect drafts a new `/week` endpoint. Because this is a shared interface that `product` must implement and `prototype` must call, the `design` child does not publish it unilaterally. Instead, it sends the proposal to the master, which puts it in front of the product manager.

![Herdr: the master session presents a decision to the product manager; the design, prototype, and product child sessions run on the right](https://mrbogomips.github.io/agent-orchestration/_astro/team-herdr.Cfcu0s73_4IuVw.png)

The master brings product-level decisions to the product manager, such as approving the `/week` API or merging the three feature branches. The design, prototype, and product child sessions run in their respective panes on the right.

3. **Approval and propagation.** The product manager approves the API directly in the master. Every change to a shared interface goes through its owner before propagating to affected sibling sessions, so the master sends a `[master]` follow-up to both `prototype` and `product`.
4. **Parallel execution.** The `prototype` child wires the new weekly view into the runnable UI. Meanwhile, in the `product` child, the builder reads the approved API spec, opens the updated prototype in the browser (both are inside its read scope), and implements the endpoint following the product's conventions and tests.

![Illustration: a hand on a mouse in front of a monitor showing the prototype, a weekly grid of people and days with one column flagged with a warning](https://mrbogomips.github.io/agent-orchestration/_astro/prototype-browser.Cl2EILpP_ZyxtAc.png)

The prototype built by the prototype child session, drawn on screen. The builder consults it alongside the documentation while working on the product.

5. **Wrap-up without status meetings.** As soon as a child session opens a pull request, it sends a `pr` message with the link; when its work is complete, it sends `done`. The master logs both in the **children record** and applies the hub's closeout rules. The product manager tracks the feature's progress from the child sessions panel without chasing anyone for status updates.

![Illustration: a product team where every person works with an agent, coordinated through a central session](https://mrbogomips.github.io/agent-orchestration/_astro/illus-team.BDW7b52k_1zJqSE.png)

## Things to keep in mind

Four constraints of the current architecture apply across these workflows:

- **Guards enforce scope; people make decisions.** The scope guard blocks file edits outside the write root even when mods are disabled. The send guard and shell inspection, however, require mods to be enabled, and shell inspection runs on a best-effort basis.
- **Single machine.** The master can only receive messages from child sessions on the same host that share its account and configuration directory. Team workflows like scenario 3 therefore share a single machine.
- **The desktop app has no guards.** A child session launched in the desktop app does not receive role variables, so its scope relies solely on the handoff instructions. When that happens, `spawn` flags it explicitly in its report.
- **Trust is per repository.** The first time a child session starts in a repository nested inside an already trusted hub, Claude Code may pause at the trust prompt for that subdirectory, which you must confirm manually.

For the internals, continue to [session-hub in depth](https://mrbogomips.github.io/agent-orchestration/session-hub/); to see how each child session is matched with a model, read [model-router](https://mrbogomips.github.io/agent-orchestration/model-router/).
