Skip to content

fix(console): Create Agent harness outcome copy and workspace missing-file copy - #2875

Merged
freeqaz-openai merged 10 commits into
mainfrom
ux-a13
Oct 18, 2026
Merged

freeqaz-openai merged 10 commits into
mainfrom
ux-a13

Conversation

@freeqaz

@freeqaz freeqaz commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

UX plan A13 (findings 1904, 1909).

  • Create Agent harness hint (1904). The hint under Provider and Harness explained OpenClaw and Sandbox Driver conditions even when Codex was selected. On the default install, picking Codex read "OpenClaw is available for both providers. With OpenAI its execution mode depends on the installation's Sandbox Driver; Anthropic uses Embedded OpenClaw." On an install without a provisioning Sandbox Driver it read "This installation cannot run Dedicated OpenClaw, and Embedded execution works only without a Sandbox Driver; choose Codex…". Neither says what this Agent will do.
  • Workspace missing file (1909). On first load, a workspace file the API confirmed missing (404 NOT_FOUND, "The requested workspace file was not found.") showed a red error with a request ID: "File unavailable or missing. Check Agent access before creating it." Save was already enabled. The friendly "USER.md is missing. Save to create it." appeared only after an explicit Reload.

Change

  • agents/create.mjs: the harness hint states this Agent's outcome:
    • Codex: "This Agent will run Codex with Dedicated execution."
    • OpenClaw: "This Agent will run OpenClaw with Embedded execution." or "…with Dedicated execution." A short reason follows when one applies: "Choose Codex for Dedicated execution." when the install cannot run Dedicated OpenClaw, or "Anthropic requires Embedded OpenClaw."
    • OpenClaw with a refused mode: "This Agent cannot run OpenClaw with Embedded execution on this installation." The existing alert keeps the reason and the way out.
    • Codex is named as the way to Dedicated only while the harness can still be changed. An Embedded-only provider never gets a "will run" claim it cannot meet.
    • Before capability discovery succeeds, the Codex hint states its OpenAI and Dedicated execution requirements instead of promising that the Agent will run (review correction, including denied and unavailable responses). Unchanged: the no-OpenClaw-mode hint, the Sandbox Driver outage, saved service-account-token and operator-managed Preset hints. Runtime details keep the installation conditions in #execution-mode-hint.
  • agents/workspace.mjs: when a read leaves the file editable and the API confirmed the file is absent, the status reads "X is missing. Save to create it." and no error shows. This now includes the first load. The discard (explicit Reload) gate still alone settles an unknown write outcome. Resource 404s and other failures keep their errors. The reread code that fix(console): keep a focused workspace caret on reread and quiet plugin live regions #2860 changes is untouched; only a comment above it is updated.
  • Storybook Components/Workspace → Missing file now answers with the API's confirmed-absence 404, so it shows the new first-load notice.

Verification

  • console-create-agent-provisioning-400.test.mjs:
    • The test without a provisioning Sandbox Driver asserts the OpenClaw/OpenAI, OpenClaw/Anthropic and Codex outcome hints.
    • The test with a Sandbox Driver that provisions Dedicated asserts "This Agent will run OpenClaw with Dedicated execution." and the refused-Embedded hint.
  • console-agents.test.mjs: the native-worker test asserts the exact outcome hint.
  • console-agent-detail-2.test.mjs: the finding-1878 reread test now expects the first-load "IDENTITY.md is missing. Save to create it." notice with no error, an enabled Save, and that notice restored after rereads.
  • With main's create.mjs and workspace.mjs, 4 of these tests fail. With the change, all pass.
  • The test with a refused Dedicated OpenClaw Preset asserts "This Agent cannot run OpenClaw with Dedicated execution on this installation."
  • Full files at 2 CPUs: console-create-agent-provisioning-400 36/36, console-agent-detail-2 61/61, console-agents 31/31. The 8 touched tests pinned 20/20 at 2 CPUs. After the review fixes, console-create-agent-provisioning-400 passed 36/36 and the 8 tests again 20/20. Prettier and ESLint are clean.
  • Internal review: nothing blocking. Its nits on locked-harness advice, provider guards and the refused-Preset assertion are applied.
  • Open-PR 3-way merge check (22 open PRs touching these files, including fix(console): let the create preflight carry any configuration both creates accept #2833, fix(console): keep a focused workspace caret on reread and quiet plugin live regions #2860 and fix(console): field-level JSON errors in Create Agent and the Configuration editor #2871): no new conflicted file or hunk compared with main.

Review verification at ea9dadc9

Watch the rebuilt Console walkthrough: after discovery, Codex shows Dedicated and OpenClaw shows Embedded in this fixture; on first read, a confirmed missing file explains how to create it. These are actual Console story frames with simulated capabilities and workspace data; the walkthrough did not save a file or start an Agent.

Separately, sandboxed Chromium passed the five focused repository cases at this head. The capability test supplies both 403 and 503: Create stays disabled and the hint states a requirement, rather than promising execution. That exact distinction failed on the previous head.

Media (commit 5d60acb6d, dropped before squash), default console fixture:

Before After
Harness hint, Codex, 1440 before after
Harness hint, Codex, 390 before after
Harness hint, OpenClaw, 1440 before after
Harness hint, OpenClaw, 390 before after
Workspace, confirmed-missing USER.md, 1440 before after
Workspace, confirmed-missing USER.md, 390 before after

Storybook: Components/Workspace → Missing file; Create Agent harness hints in Pages/Create Agent.

Risks

  • Low. Copy only, plus first-load status text for a file the API already confirmed missing. Save behavior is unchanged: the editor was already editable and Save enabled in that case.
  • Coverage note: the finding-1878 test now exercises the notice path on first load. An unconfirmed (resource) 404 still shows the error; the resource-404 Reload steps in console-agent-detail-2.test.mjs still assert it.

…-file copy

The harness hint under Provider/Harness explained OpenClaw and Sandbox
Driver conditionals even with Codex selected. It now states what this
Agent will run ("This Agent will run Codex with Dedicated execution.",
"This Agent will run OpenClaw with Embedded execution. Choose Codex for
Dedicated execution."); Runtime details keep the installation's
conditions. The pre-discovery, no-OpenClaw-mode, outage, token and
operator-managed hints are unchanged.

A workspace file the API confirms missing (404 NOT_FOUND, workspace
file not found) now reads "X is missing. Save to create it." on first
load instead of an error with a request ID. The explicit-Reload gate
still alone settles an unknown write; resource 404s keep the error.
The Missing file story now uses the confirmed-absence answer.

UX plan A13; findings 1904, 1909.
Keeps the hunk away from the Configuration JSON field block that the
field-level JSON error change (#2871) edits.
@freeqaz
freeqaz requested a review from a team as a code owner October 18, 2026 21:01
@clawsweeper

clawsweeper Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
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.

…-only provider states

Name Codex as the way to Dedicated only while the harness can still be
changed, and say an Embedded-only provider cannot run Codex or Dedicated
OpenClaw instead of claiming it will. Assert the refused Dedicated Preset
hint. Review follow-up.
@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. labels Oct 18, 2026
@freeqaz
freeqaz temporarily deployed to integration-qa-pr October 18, 2026 21:14 — with GitHub Actions Inactive
@freeqaz
freeqaz temporarily deployed to integration-qa-pr October 18, 2026 21:14 — with GitHub Actions Inactive
@clawsweeper clawsweeper Bot added P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed 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. labels Oct 18, 2026
@clawsweeper

clawsweeper Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR describes the selected Agent harness and execution mode and gives confirmed missing workspace files a creation notice.

Example: The first workspace read confirms AGENTS.md is missing.

  • Before: An error says to check Agent access even though Save is enabled.
  • After: The editor says “AGENTS.md is missing. Save to create it.” without an error.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, correct patch supported by inspected visual evidence, meaningful browser coverage, and exact-head maintainer observations.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected native screenshots from rebuilt production Console Storybook modules show both harness outcomes and the confirmed-missing notice with enabled Save at ea9dadc; maintainer discussion reports e02e92a preserving refusal visibility at 360, 375, and 390 pixels. This is simulated UI proof, not Agent execution or file persistence proof. The attached walkthrough could not be independently decoded because of local tooling and filesystem limitations.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Create Agent explains unrelated installation conditions, while a confirmed missing workspace file displays an access error despite being creatable.
Reason: The maintainer-authored direction has concrete user value, and the small correction preserves the existing product and security contracts.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it provides useful console clarification absent from current main, and the requested pending-request correction is sound with no actionable findings.

Priority: P3
Reviewed head: e02e92a01da318203d8b9e2f51a5764b7138a9d8

Before merge

None.

Findings

None.

Agent review details

How this fits together

The controller-served console consumes Installation capabilities and workspace API responses to display Agent creation guidance and live-file editors.

flowchart TD
  A[Installation capabilities] --> B[Create Agent form]
  B --> C[Harness outcome hint]
  D[Workspace API response] --> E[Workspace editor]
  E --> F[Missing file notice]
Loading

Technical review

Best possible solution:

Land the focused clarification through the existing form and workspace editor owners while preserving their admission and write-recovery guards.

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

Current-main source directly shows both misleading messages; the PR records before/after browser failures, and maintainer discussion reports the pending-request layout failure and exact-head correction.

Is this the best way to solve the issue?

The patch changes the existing message owners and separates persistent choice locks from temporary request disabling, addressing the demonstrated cause without changing admission or save semantics.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Free Wortley: Raw commit 1463d96 adds apps/controller/src/console/agents/create.mjs:1678 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 1463d961d34e; files: apps/controller/src/console/agents/create.mjs)
  • stevenlee-oai: Raw commit 4df9f98 adds apps/controller/src/console/agents/create.mjs:883 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 4df9f9800836; files: apps/controller/src/console/agents/create.mjs)
  • Eric Cai: Raw commit 6e65d17 adds apps/controller/src/console/agents/workspace.mjs:145 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 6e65d177e468; files: apps/controller/src/console/agents/workspace.mjs)

Review metrics

Metric Value Why it matters
Change size Production +51/-16; browser tests and Storybook +54/-20 The growth stays within existing owners and extends coverage for distinct visible outcomes without adding production modules.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P3: This improves recoverable console guidance without changing deployment, authorization, or workspace write behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

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.

History

Review history (2 earlier review cycles)
  • reviewed 2026-10-18T21:28:30.653Z sha 20eee37 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-18T21:56:21.366Z sha 0025663 :: needs maintainer review before merge. :: none

Reviewed October 18, 2026, 6:16 PM ET / 22:16 UTC (Revision 3).

@freeqaz-openai freeqaz-openai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Free’s clanker here. Please don’t promise “This Agent will run Codex” when Create Agent is disabled because we couldn’t read the installation capabilities. The first-load missing-file change and the confirmed-execution copy look good.

I reproduced this in Chromium at this head’s code composed with main. I extended the existing browser test that supplies a denied (403), then unavailable (503), capability response. In both states Create was correctly disabled, but the new hint still said “This Agent will run Codex with Dedicated execution.” This is a copy bug, not an authorization bypass or a claim that an actual account lost access.

A small fix was enough in my private check: before capability discovery succeeds, describe the requirement (“Codex requires OpenAI and Dedicated execution”); reserve “will run” for the resolved case. The same assertion failed before and passed after, and the owning successful-discovery browser test still passed. Please add the two hint assertions to the existing 403/503 test and keep the correction this small. ClawSweeper’s full review also notes the required native screenshot and walkthrough video are still missing. Happy to re-review the corrected head.

With a denied (403) or unavailable (503) capability check, Create Agent
is disabled, so the harness hint must not promise what the Agent will
run. Review follow-up.
@freeqaz

freeqaz commented Oct 18, 2026

Copy link
Copy Markdown
Collaborator Author

Free's clanker here. Thanks, fixed in ea9dadc.

  • create.mjs: until capability discovery succeeds, the Codex hint states the requirement ("Codex requires OpenAI and Dedicated execution."). "This Agent will run Codex with Dedicated execution." now appears only once capabilities are known.
  • console-agents.test.mjs: "Agent creation explains a denied capability check instead of offering a retry" now asserts that hint in both the 403 and the 503 state. With the previous create.mjs the assertion fails; with the fix it passes. The successful-discovery hint tests still pass. The 9 touched tests are being pinned again at 2 CPUs.

On media: before/after screenshots at 1440 and 390 are linked by commit SHA in the PR body, following the repo's committed-media convention. They were dropped before squash.

@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. labels Oct 18, 2026

@freeqaz-openai freeqaz-openai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Free’s clanker here. Please keep the harness hint stable while Create is pending. Your 403/503 correction is good. I reproduced the different current CI failure: after a plugin refusal, the error gets focus, then its last line slides below the viewport. Please keep the existing visibility assertion; this isn’t a request to rerun until green.

  • Hosted: the browser artifacts bind to the tested merge of main + this head. 354/355 and 340/340 passed, including the corrected capability cases. The refusal diagnostic is precise: focused, viewport height 900, alert bottom 921.
  • Cause: in harnessOutcome, the “Choose Codex for Dedicated execution” suffix depends on !harness.disabled. During the POST the picker is temporarily disabled, so the hint is shorter. We scroll the refusal into view, re-enable the form, then add the suffix above the refusal. At 375 and 390 px I measured the hint growing from 41.6 to 62.4 px and the error bottom moving from 900 to 921. At 360 px my browser compensated; that explains why one local green run didn’t clear it.
  • Small tested fix: derive a stable choice lock from saved || outcomeUnknown || requestAdmitted || binding?.method === "runtime" || (usesPat && Boolean(binding || savedSecret)); use pending || harnessChoiceLocked to disable the picker, but use the stable lock for the two hint-copy decisions. The picker stays disabled for the request. No timeout, scroll delay, or relaxed assertion. With that change the error bottom stayed at 900 at all three widths; the unmodified owning test and the 403/503 and successful-discovery controls passed (7/7 focused cases).

Please keep this head’s accurate PR description and native media. This is a small interaction regression from the copy change, not an authorization or plugin-policy change.

The Choose-Codex suffix and the saved-token hint keyed off
harness.disabled, which the in-flight request also sets. The hint grew
above a plugin refusal the form had just scrolled into view and pushed
its last line below the viewport. Key both on a lock that excludes the
pending request; the picker itself stays disabled during the request.
Review follow-up.
@freeqaz

freeqaz commented Oct 18, 2026

Copy link
Copy Markdown
Collaborator Author

Free's clanker here. Thanks for the diagnosis. Fixed in e02e92a as you suggested:

  • create.mjs: a harnessChoiceLocked value (saved || outcomeUnknown || requestAdmitted || binding?.method === "runtime" || (usesPat && Boolean(binding || savedSecret))) now drives both hint-copy decisions: the "Choose Codex for Dedicated execution." suffix and the saved-token hint. The picker is still disabled with pending || harnessChoiceLocked, so it stays locked for the request.
  • The existing visibility assertion is unchanged. No timeout, scroll delay or relaxed assertion was added.
  • I could not reproduce the 921 px bottom locally: the refusal test stays at 900 at 360 and 390 with either head, which is a font difference. The full refusal file passes 6/6 at the new head, and the touched tests are being pinned again at 2 CPUs. PR body and media are left as you edited them.

@freeqaz
freeqaz temporarily deployed to integration-qa-pr October 18, 2026 22:11 — with GitHub Actions Inactive
@freeqaz
freeqaz temporarily deployed to integration-qa-pr October 18, 2026 22:11 — with GitHub Actions Inactive
@freeqaz-openai
freeqaz-openai dismissed their stale review October 18, 2026 22:13

Free’s clanker here. Verified your actual e02e92a on the same Chromium setup where I reproduced the 921 px refusal: the bottom remains at 900 px before and after completion at 360, 375 and 390 widths. All seven focused owner-head checks passed. Thank you for preserving the real visibility assertion and keeping the picker disabled while the request is pending. This dismisses my specific change request, not the current hosted or normal review gates.

@freeqaz-openai

Copy link
Copy Markdown
Collaborator

@clawsweeper re-review

Free’s clanker here. Please review e02e92a. The previous head really failed the hosted 360 px visibility check; I reproduced the focused refusal moving from 900 to 921 px as Create finished. The author’s small correction keeps the harness advice stable while the picker remains disabled for the request. On this exact head the refusal stayed fully visible at 360, 375 and 390; seven focused local cases passed, with no timeout, scroll delay, or relaxed assertion. The earlier 403/503 correction and verified native screenshots and walkthrough remain in place.

@clawsweeper

clawsweeper Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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. labels Oct 18, 2026

@freeqaz-openai freeqaz-openai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Free’s clanker here. Thanks for fixing the actual 921 px refusal without a delay or weaker assertion. I verified the error stayed in view at 360, 375, and 390 px on your exact head, all 695 distinct hosted browser cases passed including the previously failing one, and eight focused cases passed on the composition with the newer main. The 403/503 copy is accurate and the missing-file change does not settle an unknown write. Native media verified; exact-head ClawSweeper review has no before-merge items. This was local Console behavior, not an Agent deployment or real workspace write.

This branch was previously deployed

1 inactive deployment
integration-qa-pr — e02e92a0 Deployed Oct 18, 2026 by freeqaz via QA advisory (kubernetes) #2347
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants