Skip to content

fix(workbench): show run request failures - #26

Merged
steipete merged 3 commits into
openclaw:mainfrom
embrace897:codex/show-workbench-run-errors
Nov 21, 2026
Merged

steipete merged 3 commits into
openclaw:mainfrom
embrace897:codex/show-workbench-run-errors

Conversation

@embrace897

@embrace897 embrace897 commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

What changed

Agent Workbench silently returned to idle when a run request failed and left the rejected promise unhandled. It now shows a safe accessible alert, restores the controls after client cleanup, and clears the alert when the user retries or resets. Raw provider errors are not rendered.

Add component coverage for failures during client construction, run creation, streaming, waiting, and cleanup, plus successful retry and reset. Refresh eligible Lucide, lint, and test dependencies while preserving the two-day maturity policy and existing security overrides.

Validation

  • Reproduced the original failure in Chrome using a synthetic SDK that rejects the first run and succeeds on the second: no alert and an unhandled rejection before; visible alert, no unhandled rejection, and a successful retry after.
  • Seven new component tests fail against the original App and pass against this change.
  • Full local pnpm check: 34 tests, type checking, formatting, lint, docs, all starter builds, and both CLI smoke tests pass.
  • Independent Codex P0–P2 review passes. Exact-head CI is required before merge.

The screenshots contain only the local synthetic app and an explicitly labelled test-fixture indicator. No live Gateway or credentials were used.

Before:

Before: the failed run silently returns to idle

After:

After: Run controls shows an accessible error

Thanks @embrace897 for the original fix.

@clawsweeper

clawsweeper Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal priority bug or improvement with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 15, 2026
@clawsweeper

clawsweeper Bot commented Nov 15, 2026

Copy link
Copy Markdown

Codex review: needs real behavior proof before merge.

What this changes

Catch rejected Workbench runs, display an accessible failure alert, and clear it on retry or reset.

Example: The SDK rejects a Run request for agent main and session workbench.

  • Before: Workbench returns to idle without an alert and leaves the rejection unhandled.
  • After: Workbench shows a failure alert, handles the rejection, and clears the alert when the user retries or resets.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The implementation is focused and source-consistent, but the required browser behavior evidence is absent.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A rejected run request silently returns Workbench to idle, leaving the user without an explanation.
Reason: Handling an existing asynchronous failure and displaying it in the current controls provides clear value without introducing options or changing successful results.

Merge readiness

⛔ Blocked before merge - 1 item remains

This PR addresses a real error-handling gap still present on main; the focused patch has no definite correctness findings.

Priority: P2
Reviewed head: fab8e848eed96492e01a4fefbee0637cecf1f38a

Before merge

  • Add real behavior proof - The body describes Edge exercising the real Workbench form with a one-time SDK-shim rejection and a successful retry, but supplies no inspectable runtime evidence; attach a recording or screenshots with console output showing that scenario and reset clearing, with sensitive values redacted. After adding proof, update the PR body, then request a new review with @clawsweeper re-review. The PR author or someone with repository write access can request it.

Findings

None.

Tests

  • Missing end-to-end proof: Provide browser evidence of the injected rejection, visible alert, absence of an unhandled rejection, and alert clearing through retry and reset; existing redaction tests do not exercise this path.
Agent review details

How this fits together

The React Workbench submits form settings to the workspace SDK, streams run events, displays results, and closes the client.

flowchart TD
  A[Run controls] --> B[Submit handler]
  B --> C[SDK run lifecycle]
  C --> D[Events and result panels]
  C --> E[Client cleanup]
  E --> B
  B --> F[Failure alert and ready controls]
Loading

Technical review

Best possible solution:

Keep the focused submission-level rejection handler and accessible alert while preserving the existing run lifecycle.

Do we have a high-confidence way to reproduce the issue?

Main demonstrably leaves a rejected startRun promise uncaught and renders no failure alert; the contributor reports reproducing this with an injected SDK rejection, but no reproduction was executed during this review.

Is this the best way to solve the issue?

The existing form handler is the appropriate owner for catching submission failures, and the patch adds only local UI state without changing SDK APIs or persisted settings.

AGENTS.md: not found in the target repository.

Codex review notes: model internal, reasoning medium; reviewed against 46c98a311e2e.

Provenance checked

  • Workbench submission handling and lifecycle cleanup keeps the original intent (233792e: The standalone SDK examples commit established this lifecycle; the original blob and merged [codex] build OpenClaw SDK cookbook #1 provide no indication that silent request failures were intentional.)
  • Reset controls keeps the original intent (233792e: The existing reset clears transient run output; clearing the new transient failure alert follows that behavior.)

Testing

Proof path: none.

Security

None.

Evidence

What I checked:

  • Pinned introduced change: The patch adds failure state and a submission rejection handler, clears the alert on retry and reset, and restores controls after client cleanup. (sdk/agent-workbench/src/App.tsx:163, fab8e848eed9)
  • Main retains the error-handling gap: Main submits startRun without a rejection handler; its finally block resets controls and closes the client without displaying request failures. (sdk/agent-workbench/src/App.tsx:159, 46c98a311e2e)
  • Actual SDK boundary: Workbench depends on the local workspace SDK shim; its default run succeeds without contacting a Gateway, so the reported failure scenario requires the described injected rejection. (packages/openclaw-sdk-shim/src/index.ts:223, 46c98a311e2e)
  • Feature history and original intent: GitHub identifies App.tsx as added in the standalone examples commit, and its original blob already contains the uncaught submission path. The associated merged contribution, [codex] build OpenClaw SDK cookbook #1, has no body explaining intentional silent failures. (sdk/agent-workbench/src/App.tsx, 233792e097de)
  • Supplied verification: The full PR body describes an Edge run with an injected SDK rejection, followed by successful retry; it supplies no screenshot, console trace, recording, or linked artifact. Both discussion comments are bot status messages, and there are no reviews. (fab8e848eed9)
  • History coverage and local limit: Scoped log, symbol-history search, blame, and original blobs identify the run lifecycle contributor and subsequent UI work. Follow-history reaches an unavailable creation-parent object; GitHub independently confirms the file addition. (sdk/agent-workbench/src/App.tsx:79, 46c98a311e2e)

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add P2: Silent request failures affect a standalone developer example, with limited scope and a focused repair.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Label justifications:

  • P2: Silent request failures affect a standalone developer example, with limited scope and a focused repair.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 15, 2026, 1:08 PM ET / 18:08 UTC.

roboclaw-bot and others added 2 commits November 17, 2026 10:32
Add reader-first problem, impact, rationale, and evidence guidance grounded in cookbook tasks. Preserve existing contribution checks without introducing new gates.

Co-authored-by: hannesrudolph <[email protected]>
Show a safe accessible alert for rejected run requests, restore controls after client cleanup, and clear errors on retry or reset. Add component regression tests covering all request phases and recovery, plus the required JSX test types. Refresh eligible icon, lint, and test dependencies while retaining the dependency maturity policy and security overrides.

Co-authored-by: embrace897 <[email protected]>
@steipete
steipete merged commit 4a31ba5 into openclaw:main Nov 21, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants