Skip to content
Python

Surface the reviewer pause on the composer mode chip

Rohit C Prasad2c843cb54ed7
diff --git a/surfaces/gui/e2e/fixtures.ts b/surfaces/gui/e2e/fixtures.ts
index 9dc94209..1062e08b 100644
--- a/surfaces/gui/e2e/fixtures.ts
+++ b/surfaces/gui/e2e/fixtures.ts
@@ -24,6 +24,7 @@ const HEALTH = { status: "ok", default_workspace: null, model: "anthropic:claude
const SETTINGS = {
provider: "openai",
+ auto_approve: true, // surfaces the Auto-approve mode entry (reviewer feature flag)
model: "anthropic:claude-opus-4-8",
models: ["anthropic:claude-opus-4-8", "gpt-5.5", "gpt-4o", "gpt-4o-mini", "o3-mini"],
has_key: true,
@@ -688,6 +689,19 @@ export async function mockApi(page: import("@playwright/test").Page) {
input: msg.text,
...(msg.skill ? { display: `/${msg.skill}${msg.text ? ` ${msg.text}` : ""}` } : {}),
});
+ if (/trip the reviewer/i.test(msg.text)) {
+ send("tool_proposed", { name: "run_shell", arguments: { command: "semgrep scan" } });
+ send("tool_finished", {
+ name: "run_shell",
+ status: "denied",
+ reason: "blocked by the safety reviewer",
+ reviewer_reason: "This creates files even though you asked not to.",
+ allow_anyway: true,
+ reviewer_paused:
+ "Auto-approve is paused for the rest of this turn — the reviewer blocked 5 actions in a row, so approvals now come to you.",
+ });
+ return; // turn stays open: the pause is a mid-turn state
+ }
if (/run a tool/i.test(msg.text)) {
pendingTool = "run_shell";
send("tool_proposed", { name: "run_shell", arguments: { command: "ls" } });
diff --git a/surfaces/gui/e2e/reviewer-paused.spec.ts b/surfaces/gui/e2e/reviewer-paused.spec.ts
new file mode 100644
index 00000000..d261a459
--- /dev/null
+++ b/surfaces/gui/e2e/reviewer-paused.spec.ts
@@ -0,0 +1,23 @@
+// §8.4 breaker surfacing (owner ask 2026-08-24): when the Auto-Approve reviewer pauses
+// itself after 5 straight denials, the transcript gets a notice AND the composer's mode
+// chip says "· paused" — quietly, until the turn ends or an ask_user answer resets it.
+import { expect } from "@playwright/test";
+import { test } from "./fixtures";
+
+test("reviewer pause shows a transcript notice and marks the mode chip", async ({ page }) => {
+ await page.goto("/");
+ await page.getByText("Draft the launch note").first().click();
+
+ // Switch the session into Auto-approve (entry gated on the settings flag).
+ await page.getByRole("button", { name: "Mode", exact: true }).click();
+ await page.getByTestId("mode-menu").getByText("Auto-approve").click();
+
+ const box = page.getByPlaceholder(/Ask the coworker/);
+ await box.fill("trip the reviewer");
+ await box.press("Enter");
+
+ // The tripping deny carries the pause: notice inline, "· paused" on the chip.
+ await expect(page.getByText(/Auto-approve is paused for the rest of this turn/)).toBeVisible();
+ await expect(page.getByTestId("mode-paused")).toBeVisible();
+ await expect(page.getByRole("button", { name: "Mode", exact: true })).toContainText("paused");
+});
diff --git a/surfaces/gui/src/App.tsx b/surfaces/gui/src/App.tsx
index 5e9c7c0b..522ddf18 100644
--- a/surfaces/gui/src/App.tsx
+++ b/surfaces/gui/src/App.tsx
@@ -181,6 +181,9 @@ export function App() {
// The draft folder came from the user's own chip pick (not boot-resume or scratch
// adoption). Only such a pick survives a coworker change (owner catch 2026-08-24).
const [draftFolderPicked, setDraftFolderPicked] = useState(false);
+ // §8.4 breaker tripped this turn — the mode chip shows "· paused" until the turn ends
+ // or an ask_user answer resets the reviewer's denial streak (engine semantics).
+ const [reviewerPaused, setReviewerPaused] = useState(false);
// UX-029 send-time folder enforcement: the stashed message while the folder dialog is
// up. The message goes out the moment the dialog resolves; Escape restores the draft.
const [sendGate, setSendGate] = useState<{
@@ -706,6 +709,7 @@ export function App() {
break;
case "turn_start":
setRunning(true);
+ setReviewerPaused(false); // a fresh user message resets the denial streak
setStreaming("");
setReasoningStream("");
// Background-delivered turns (channel message, self-wake, durable resume) have no local
@@ -870,9 +874,12 @@ export function App() {
),
);
// §8.4 breaker: the reviewer paused itself for the rest of the turn — say so
- // where the user is looking (persisted server-side for reloads).
- if (d.reviewer_paused)
+ // where the user is looking (persisted server-side for reloads) and on the
+ // composer's mode chip.
+ if (d.reviewer_paused) {
+ setReviewerPaused(true);
setItems((p) => [...p, { kind: "notice", tone: "info", text: String(d.reviewer_paused) }]);
+ }
// Refresh the right rail when something it shows may have changed: browser state, or a
// file write that should appear under Artifacts immediately (not only after the turn).
if (String(d.name || "").startsWith("browser_") || FILE_WRITE_TOOLS.has(d.name)) {
@@ -934,6 +941,7 @@ export function App() {
break;
case "turn_done":
setRunning(false);
+ setReviewerPaused(false); // the pause is scoped to the turn
refreshSessions();
// Catch-all artifact refresh: files created via shell or on a brand-new session (whose
// record only exists after the first save) appear once the turn completes.
@@ -1169,6 +1177,7 @@ export function App() {
sessionRef.current?.respondTool(approved);
};
const answerQuestion = (answer: string) => {
+ setReviewerPaused(false); // an answered question resets the reviewer's streak
setItems((p) => resolveLastQuestion(p, answer));
dropSessionInbox("question");
sessionRef.current?.respondQuestion(answer);
@@ -1368,6 +1377,7 @@ export function App() {
setStreaming("");
setRunning(false);
if (ag) setAgent(ag);
+ setReviewerPaused(false);
setDraftFolderPicked(false); // a resumed session's folder is inherited, not a pick
setTempWorkspace(false); // the `ready` event restores the truth for temp sessions
if (!gatesWorkspace(ag)) setShowGate(false);
@@ -2082,6 +2092,7 @@ export function App() {
usage={usage}
contextWindow={modelContextWindows[model]}
contextBar={contextBar}
+ reviewerPaused={reviewerPaused}
placeholder={
agent === "code"
? "Ask the coder to build, fix, or explain… (drop or paste files)"
diff --git a/surfaces/gui/src/components/Composer.tsx b/surfaces/gui/src/components/Composer.tsx
index f7a8330e..c57d46f9 100644
--- a/surfaces/gui/src/components/Composer.tsx
+++ b/surfaces/gui/src/components/Composer.tsx
@@ -129,6 +129,9 @@ interface Props {
contextWindow?: number;
// Settings toggle (default off): true shows the fill bar instead of the session total.
contextBar?: boolean;
+ // §8.4 breaker tripped this turn: the mode chip says so quietly until the turn ends
+ // or an ask_user answer resets the streak.
+ reviewerPaused?: boolean;
}
export function Composer(props: Props) {
@@ -674,6 +677,7 @@ export function Composer(props: Props) {
</div>
) : props.workspace !== undefined ? (
<ModeMenu
+ reviewerPaused={props.reviewerPaused}
mode={props.mode}
onModeChange={props.onModeChange}
unattended={props.unattended}
@@ -935,11 +939,13 @@ function ModeMenu({
onModeChange,
unattended,
onUnattendedChange,
+ reviewerPaused,
}: {
mode: string;
onModeChange: (mode: string) => void;
unattended?: boolean;
onUnattendedChange?: (on: boolean) => void;
+ reviewerPaused?: boolean;
}) {
const [open, setOpen] = useState(false);
// The Auto-Approve entry is gated on the server flag. Fetch once on first open; a session
@@ -969,10 +975,16 @@ function ModeMenu({
aria-label="Mode"
title={
`Mode: ${current?.label || mode}` +
+ (reviewerPaused && mode === "auto-approve"
+ ? " · paused for this turn — the reviewer blocked several actions in a row, approvals come to you"
+ : "") +
(unattended ? " · approvals go to the Inbox" : "")
}
>
{current?.label || mode}
+ {reviewerPaused && mode === "auto-approve" && (
+ <span className="text-[11px] text-warnInk" data-testid="mode-paused">· paused</span>
+ )}
<Icon name="chevronDown" size={11} className="text-faint" />
</button>
{open && (