From a722935dbc60566152e9e6d4ea3827e77e247605 Mon Sep 17 00:00:00 2001 From: Dotta <34892728+cryppadotta@users.noreply.github.com> Date: Sat, 21 Nov 2026 19:14:37 -0600 Subject: [PATCH] fix(tasks): show no failure notice when an agent hands its blocker to a person (#22325) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work > - The task page shows one execution notice above the conversation (`ExecutionBlockerNotice`). A red, tinted notice with an error icon is for an attempt that failed and stopped retrying > - #22140 sends a task-wide blocker to the board when its owner is not a person kind (for example `external`), or when an agent blocker repeats. The task shows `userAction: "unblock"` > - For `unblock`, the notice showed the red failure notice: "The agent stopped and needs your help to continue. Read its last comment, do what it asks, then Retry." > - But nothing failed. The agent finished its run and correctly reported that it waits for a person. A blocker with owner kind `user` shows no notice at all, so the two cases look different for the same situation > - This pull request removes the red notice for `unblock`. The task looks like any other task that is blocked on a person > - The benefit is that a red error notice appears only for a real failure ## Linked Issues or Issue Description Refs #22140 **What happened?** An agent reported a task-wide blocker. The owner was an outside operator (owner kind `external`). Paperclip sent the blocker to the board and set the task to Blocked. The task page then showed a large red notice: "The agent stopped and needs your help to continue. Read its last comment, do what it asks, then Retry." The task did not fail. It waits for a person. **Expected behavior** A task that waits for a person shows no failure notice. The Blocked status, the agent's last comment and the reply box tell the person what to do, as for a blocker with owner kind `user`. **Steps to reproduce** 1. Run a native task. Make the agent call `paperclip_block` with owner kind `external`, scope `task_wide`. 2. See the decision `native_agent_blocker_needs_person` and the task status Blocked. 3. Open the task. See the red "The agent stopped and needs your help" notice with Retry. **Paperclip version or commit** `master` at 1355f93546. ## What Changed - `ui/src/components/ExecutionBlockerNotice.tsx`: removed the red notice for `userAction: "unblock"`. The component now shows no notice for it, the same as for other person-owned blockers. - `ui/src/components/ExecutionBlockerNotice.test.tsx`: the `unblock` test now expects no notice. - No server change. The server still projects `userAction: "unblock"` with `canRetry: true`. The inbox row label ("The agent needs your help"), the board attention item ("Unblock") and the Retry API stay the same. ## Verification - Red before the fix: `cd ui && npx vitest run src/components/ExecutionBlockerNotice.test.tsx` failed. The notice rendered "The agent stopped and needs your help to continue. … Retry". - Green after the fix: the same command passes (24 tests). - `cd ui && npx vitest run` on all 17 UI test files that reference the task interruption, `ExecutionBlockerNotice`, or its Retry and waiting handles (including `IssueDetail.test.tsx`, `Inbox.test.tsx`, `useTaskRetry.test.tsx`, `TaskChatThread.test.tsx`): 1327 passed, 1 skipped. - `cd ui && npx tsc --noEmit`: no errors in the changed files. The local run showed 21 errors in other files: the generated Storybook catalog, `PluginOrganizationSwitcher` and `paperclip-runner` `replay-contract.ts`. The local install was partial (UI packages only, no build scripts) because the disk was full, so these errors come from the environment. Required CI covers the full typecheck. - Not run: `pnpm verify`. It selects 616 test files conservatively and needs the CLI packages, which the partial install did not include. Not run: a live browser check. Required CI supplies the broad coverage. ## Risks - Low risk. This is a UI-only change. - The task page no longer shows a Retry button for this hand-off. A person continues the task with a reply: a person's comment on a Blocked task that has an agent assignee moves it to Todo and wakes the agent. Retry is still available from the inbox row, and the Retry API is unchanged. > For core feature work, check [`ROADMAP.md`](ROADMAP.md) first and discuss it in `#dev` before opening the PR. Feature PRs that overlap with planned core work may need to be redirected — check the roadmap first. See `CONTRIBUTING.md`. ## Model Used - Claude Opus 5.5 (Anthropic), model ID `claude-opus-5-5`, used through Claude Code with tool use (code search, editing, shell, test runs). ## Checklist - [x] I have included a thinking path that traces from project context to this change - [x] I have specified the model used (with version and capability details) - [x] I have checked ROADMAP.md and confirmed this PR does not duplicate planned core work - [x] I have searched GitHub for duplicate or related PRs and linked them above - [x] I have either (a) linked existing issues with `Fixes: #` / `Closes #` / `Refs #` OR (b) described the issue in-PR following the relevant issue template - [x] I have not referenced internal/instance-local Paperclip issues or links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip` URLs) - [x] My branch name describes the change (e.g. `docs/...`, `fix/...`) and contains no internal Paperclip ticket id or instance-derived details - [x] I have run tests locally and they pass - [x] I have added or updated tests where applicable - [x] I have updated relevant documentation to reflect my changes - [x] I have considered and documented any risks above - [ ] All Paperclip CI gates are green - [ ] Greptile is 5/5 with no open P2s, recommendations, or follow-ups - [ ] I will address all Greptile and reviewer comments before requesting merge 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 --- ui/src/components/ExecutionBlockerNotice.test.tsx | 7 ++----- ui/src/components/ExecutionBlockerNotice.tsx | 10 ---------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/ui/src/components/ExecutionBlockerNotice.test.tsx b/ui/src/components/ExecutionBlockerNotice.test.tsx index 1dcffa21447..dcf7aac9d16 100644 --- a/ui/src/components/ExecutionBlockerNotice.test.tsx +++ b/ui/src/components/ExecutionBlockerNotice.test.tsx @@ -38,12 +38,9 @@ describe("ordinary task interruption", () => { expect(container.querySelector("a, details, input, textarea")).toBeNull(); expect(container.textContent).not.toMatch(/service attention|process|receipt|workspace/i); }); - it("asks the person to help a blocked agent and offers Retry", async () => { + it("does not report a failed attempt for a task the agent handed to a person", async () => { await render({ ...failed, responsibility: "user", state: "waiting_for_user", userAction: "unblock" }); - expect(container.textContent).toContain("needs your help to continue"); - expect(container.textContent).not.toMatch(/blocker_|native|owner kind/i); - await act(async () => container.querySelector('[data-testid="task-execution-retry"]')!.click()); - expect(retry).toHaveBeenCalledOnce(); + expect(container.textContent).toBe(""); }); it.each([false, true])("names the question without repeating a historical failure (manual Retry=%s)", async canRetry => { diff --git a/ui/src/components/ExecutionBlockerNotice.tsx b/ui/src/components/ExecutionBlockerNotice.tsx index 840d1b8e88b..15f50a1bdf7 100644 --- a/ui/src/components/ExecutionBlockerNotice.tsx +++ b/ui/src/components/ExecutionBlockerNotice.tsx @@ -123,16 +123,6 @@ export function ExecutionBlockerNotice({ presentation, canRetry, onRetry, optimi ); - if (!optimistic && presentation?.userAction === "unblock") return ( -
-
-
-
- ); if (optimistic || !presentation || presentation.responsibility !== "system" || !["failed", "retry_scheduled"].includes(presentation.state)) return null; return (