From 619cef626fc868670367cdaee3d5e399da0cbbe3 Mon Sep 17 00:00:00 2001 From: Axel Delafosse Date: Thu, 26 Mar 2026 22:10:20 -0700 Subject: [PATCH] Clarify interactive tmux plan review prompts --- src/loop/tmux.ts | 6 ++++++ tests/loop/tmux.test.ts | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/src/loop/tmux.ts b/src/loop/tmux.ts index e088722..074096e 100644 --- a/src/loop/tmux.ts +++ b/src/loop/tmux.ts @@ -242,6 +242,9 @@ const buildInteractivePrimaryPrompt = ( ); parts.push(pairedBridgeGuidance(opts.agent, runId)); parts.push(pairedWorkflowGuidance(opts, opts.agent)); + parts.push( + `If the human asks for plan mode, write PLAN.md first, ask ${peer} for a plan review, iterate on PLAN.md, then ask the human to review the plan before implementing.` + ); parts.push( `Wait for the first human task. Do not implement until one arrives. Once it does, coordinate directly with ${peer} and keep the paired review workflow intact. Do not send a message to ${peer} until then.` ); @@ -262,6 +265,9 @@ const buildInteractivePeerPrompt = ( appendProofPrompt(parts, opts.proof); parts.push(pairedBridgeGuidance(agent, runId)); parts.push(pairedWorkflowGuidance(opts, agent)); + parts.push( + `If ${primary} asks for a plan review, review PLAN.md only, suggest concrete fixes, and wait for the next request.` + ); parts.push( `Wait for ${primary} to provide a concrete task or review request. Do not send a message to ${primary} yet. If the human clearly assigns you separate work in this pane, treat that as a new task. If you are answering ${primary}, use the bridge tools instead of a human-facing reply.` ); diff --git a/tests/loop/tmux.test.ts b/tests/loop/tmux.test.ts index afa42ed..5f3307d 100644 --- a/tests/loop/tmux.test.ts +++ b/tests/loop/tmux.test.ts @@ -796,11 +796,17 @@ test("interactive tmux prompts tell both agents to wait for the human", () => { expect(primaryPrompt).toContain("Agent-to-agent pair programming"); expect(primaryPrompt).toContain("No task has been assigned yet."); expect(primaryPrompt).toContain("Wait for the first human task"); + expect(primaryPrompt).toContain("If the human asks for plan mode"); + expect(primaryPrompt).toContain("ask Claude for a plan review"); + expect(primaryPrompt).toContain("ask the human to review the plan"); expect(primaryPrompt).toContain( 'Use "send_to_agent" with target: "claude" for Claude-facing messages' ); expect(primaryPrompt).toContain("worktree isolation"); expect(peerPrompt).toContain("No task has been assigned yet."); + expect(peerPrompt).toContain( + "If Codex asks for a plan review, review PLAN.md only" + ); expect(peerPrompt).toContain("Wait for Codex to provide a concrete task"); expect(peerPrompt).toContain("human clearly assigns you separate work"); expect(peerPrompt).toContain('"reply"');