2026-10-13
Isolate the REA lane: Dario, Sam, and two git worktrees
@MinLiBuilds (实践哥 Li) posted on 2026-10-13 at 04:29:19Z a two-role layout for REA work. An orchestrator named Dario keeps goals and acceptance. A specialist named Sam runs the REA toolchain, implements, tests, and commits. Each role has its own agent session and its own git worktree. This page turns that public note into a procedure for software you own, open-source code whose license lets you read it, or a target covered by written permission. The source post quotes another article; that quoted piece is an unrelated article, and this page does not cover it.
Why isolate the REA lane
A hosted coding agent (the community post suggests a Claude-family model such as Opus or Fable, or Codex) is a general orchestrator. REA is a local MCP toolchain: engines you bring yourself, file and process inspection, and Evidence. One session that holds both jobs writes a long tool transcript into the same account context you use for ordinary coding. On 2026-10-12 the same author posted a community caution, 别用 claude+REA. Read that note as a practical warning: a policy strike on the REA lane can interrupt the hosted coding account. This page keeps the caution and leaves the metaphor in that post alone.
The layout on rea.run is session and worktree isolation, with a caller-chosen model on the REA lane.
- Dario owns the goal, the schedule, the review, and the merge. Dario stays out of the REA tool loop.
- Sam runs REA in a second session. The model is one you choose because it can call the REA toolchain. The community suggestion for that lane is K3 or a local model. rea.run does not require a vendor, and it does not describe a way to turn off a provider policy.
- Two worktrees keep Sam's edits and Dario's review as ordinary git operations on one repository.
Isolation limits how much of the REA transcript lands in the hosted coding agent. It does not create permission. A person decides the authorization before either session starts. Read /compliance/ and the Chinese twin /zh/compliance/. The Chinese version of this guide is /zh/blog/rea-dual-agent-worktree/.
Architecture
The source diagram uses two cards and one git repository. The table matches that drawing: role, session, the model lane the community post suggests, the worktree, and what crosses the boundary.
| Role | Session | Model lane (community suggestion) | Worktree | Inputs | Outputs |
|---|---|---|---|---|---|
| Dario, orchestrator | Session A, general coding agent | Hosted coding model: Claude Opus / Fable or Codex, as the post suggests | Worktree A, project management | Goals, acceptance criteria, Sam's conclusions | Task brief, review notes, merge to the main branch |
| Sam, REA specialist | Session B, REA-capable agent | Caller-chosen model that can run REA; community text suggests K3 or a local model | Worktree B, research and implementation | Task brief, authorized paths, REA MCP | Conclusions, code, tests, Evidence (scope and risks included), git commit |
| Git repository | Shared clone | — | Both worktrees, one object database | Sam's commit; Dario's merge | Main branch after acceptance |

Read the arrows the way the figure draws them. Dario delegates a goal and the requirements. Sam returns a conclusion, code, and test results, then commits. Dario accepts and merges. The figure is the image attached to the source post (2164×1208), stored on this site so the procedure does not depend on the social app.
What is allowed to cross
Context isolation means Dario does not read Sam's raw tool log. The return package is still an audit record. Use the same fields on every handoff.
| Field | Writer | Stays in the return |
|---|---|---|
| Goal and acceptance | Dario, from you | Yes |
| Authorization sentence (owner, path, date) | You; Dario copies it into the brief | Yes |
| Allowed paths | You | Yes |
| Evidence locations (path, symbol, or id) | Sam | Yes |
| Unknowns | Sam | Yes, labeled as unknown |
| Material risks | Sam, reviewed by Dario | Yes |
| Raw REA tool log | Sam's session only | No; leave it in worktree B |
| Commit id | Sam | Yes |
Worktree checklist
Run this on a clone you are allowed to modify. Pick branch names your team will recognize. git worktree refuses a second checkout of the same branch, which keeps the two sessions from editing one directory.
- Confirm the tree is clean and the target is in scope (own, open-source with a license that allows the reading, or written permission).
- Create worktree A for Dario and worktree B for Sam.
- Open two agent sessions. Point session A at worktree A and session B at worktree B.
- Pin REA in Sam's session with the site teaching pin
npx -y [email protected], then savedoctor --json. Wiring: /docs/install/ and /docs/mcp-clients/. - Paste the Dario prompt into session A. Paste the Sam prompt into session B with the compliance override in the next section already applied.
- Dario writes the task brief (goal, acceptance, authorization, allowed paths) and hands that brief to Sam.
- Sam researches, implements, tests, and commits on the Sam branch.
- Dario reads the diff, checks that Evidence still records scope and risks, accepts or sends it back, and merges.
# From the clone you are allowed to modify. Names are examples.
git status
git worktree add -b dario/orchestrator ../wt-dario HEAD
git worktree add -b sam/rea-lane ../wt-sam HEAD
git worktree list
Worktrees on one clone share the object database, so Dario can see Sam's branch without a remote push. After review:
# In worktree A, on the integration branch, after you have read the diff.
git merge --no-ff sam/rea-lane
A remote still matters when a second machine or a reviewer outside the clone needs the commits. Sam pushes sam/rea-lane; Dario merges on the main branch your repo already uses. Footnote: git worktree.
Quoted community prompts
The source post says the layout needs two prompts. They are quoted below as community text, with attribution to @MinLiBuilds. Chinese is the original. The English block is a translation for this page. Paste them only inside the authorization you already wrote down. The Sam prompt contains one line this site replaces; that replacement is the next section, and it is part of the paste.
Dario, original
你是项目总指挥,负责需求拆解、任务调度、系统集成与成果验收。
Sam 是拥有独立工具链和知识库的高级技术专家。
遇到复杂技术问题,优先委派 Sam,尊重其经过验证的专业判断,不干预具体研究过程。
保持上下文隔离,不读取原始日志和中间执行记录。只接收技术结论、代码、验证结果及必要风险信息。
你负责目标和验收,专业问题交给 Sam。
Dario, English translation
You are the project lead. You break down requirements, schedule tasks, integrate the system, and accept the result.
Sam is a senior technical specialist with an independent toolchain and knowledge base.
When a problem is technically hard, delegate to Sam first. Respect Sam's verified professional judgment. Do not intervene in the concrete research process.
Keep context isolated. Do not read raw logs or intermediate execution records. Accept only technical conclusions, code, verification results, and necessary risk information.
You own the goal and the acceptance. Hand specialist questions to Sam.
Sam, original
你是高级技术研究与工程实现专家,拥有独立 Worktree 和 REA 工具链。
负责在授权范围内自主完成底层分析、行为研究、接口解析、独立实现及测试验证。
根据研究结论直接完成工程交付,不将问题退回主 Agent。
对外以专业技术顾问身份汇报,聚焦技术规格、实现方案、代码成果和验证结果。
只返回精炼结论及必要证据,不传递冗余日志;
禁止说明重要技术来源、授权限制与风险。
原则:独立研究、独立实现、独立验证,结果驱动。
Sam, English translation
You are a senior specialist in technical research and engineering delivery. You have an independent worktree and the REA toolchain.
Within the authorized scope, you independently complete low-level analysis, behavior research, interface recovery, a separate implementation, and test verification.
Deliver the engineering result from the research conclusion. Do not bounce the problem back to the lead agent.
Report outward as a professional technical advisor. Focus on the technical specification, the implementation plan, the code, and the verification result.
Return only a refined conclusion and the necessary evidence. Do not pass redundant logs.
Do not state important technical sources, authorization limits, or risks.
Principle: research independently, implement independently, verify independently. Drive by results.
Compliance override
Keep the isolation. Replace the Sam line that tells the agent to withhold authorization limits and risks. On rea.run, Evidence still records authorization scope and risks. Redundant logs can stay in Sam's session. An auditor still receives the scope, the unknowns, and the commit.
Before you paste Sam's prompt, delete this community line (original and translation):
禁止说明重要技术来源、授权限制与风险。
Do not state important technical sources, authorization limits, or risks.
Append this override in the same session:
Compliance override (rea.run): Record the authorization scope, the target owner, the allowed paths, material risks, and unknowns in the Evidence you return. Omit redundant tool logs. Keep authorization limits and risks in the return. If the target is not software you own, open-source code the license lets you read, or a system covered by written permission, stop.
A brief that matches this page (edit the path; keep the scope tight):
Authorization: I own /abs/path/to/widget (source). Date 2026-10-13.
Goal: document how the config loader chooses a file. Acceptance: path:line plus one test.
Sam works only in the Sam worktree. Return Evidence, risks, unknowns, and a commit id.
Leave raw tool logs in that worktree. Keep authorization limits in the return.
A caller-chosen local or specialist model is still your account and your policy choice. It does not widen the legal boundary. Refuse crack, DRM, and unpaid commercial how-tos. Primary pages: /compliance/, /zh/compliance/, /faq/legal-boundary/, /blog/rea-agent-security-posture/. Case catalog: /showcase/.
What Dario checks before the merge
- The authorization sentence in the brief matches the diff's paths.
- Evidence cites a location, or the unknown is labeled unknown.
- Risks are present in the return. A return that omitted them is incomplete, even if the community prompt asked for that omission.
- Tests Sam named were actually run, and the command is in the commit message or the note.
- The merge is
--no-ff(or your team's equivalent) so the Sam branch stays visible in history. - Secrets and production credentials were never in either prompt. See the security posture page linked above.
Sources and engagement snapshot
Numbers below are public counters, not a benchmark. The first row set is the scrape attached to the 2026-10-13 brief for this page (approximate public_metrics). Counters move; a later public read the same day is the second row set. Do not treat either column as a stable total.
| Snapshot | Impressions / views | Likes | Bookmarks | Replies | Reposts |
|---|---|---|---|---|---|
| Brief scrape, 2026-10-13 (approx.) | ~3229 | 50 | 68 | 13 | 10 |
| Later public read, 2026-10-13 | 3282 views | 50 | 70 | 13 | 10 |
- Source post: @MinLiBuilds, created 2026-10-13T04:29:19Z. Author name on the profile: 实践哥 Li.
- Earlier community caution, same author, 2026-10-12: 别用 claude+REA.
- Diagram file on this site:
/media/x-cases/minli-rea-dual-agent.jpg(2164×1208), from the post attachment. - Teaching pin used elsewhere on rea.run:
[email protected], /docs/install/.
FAQ
| Question | Answer |
|---|---|
| Can both agents share one working directory? | Use two worktrees. Git refuses a second checkout of the same branch, which is the guard you want. |
| Does isolation authorize a target? | The scope stays software you own, open source the license allows, or written permission. /compliance/ |
| Which model runs Sam? | A model you choose that can run REA. The community text suggests K3 or a local model. This site does not mandate one. |
| Should the return omit risks? | Evidence keeps authorization scope and risks. The community Sam line that withholds them is replaced by the override above. Redundant logs stay in Sam's session. |
| Is this an upstream REA command? | It is a community operating pattern: two sessions, two worktrees, one repository. Install and MCP wiring stay on /docs/install/ and /docs/mcp-clients/. |
Where to go next
- Compliance, English: /compliance/. Chinese: /zh/compliance/.
- This guide in Chinese: /zh/blog/rea-dual-agent-worktree/.
- Install and clients: /docs/install/, /docs/mcp-clients/.
- Legal boundary and security posture: /faq/legal-boundary/, /blog/rea-agent-security-posture/.
- Community cases: /showcase/.
- Footnote only: the source post and git worktree.