Skip to content

feat(crestodian): conversational agent-loop onboarding across CLI, web install, and macOS app#99935

Merged
steipete merged 18 commits into
mainfrom
claude/wizardly-ishizaka-7410c7
Jul 5, 2026
Merged

feat(crestodian): conversational agent-loop onboarding across CLI, web install, and macOS app#99935
steipete merged 18 commits into
mainfrom
claude/wizardly-ishizaka-7410c7

Conversation

@steipete

@steipete steipete commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Closes #99934.

Onboarding was a different multi-step wizard on every surface, and the macOS onboarding chat dead-ended with No API key found for provider "openai" on machines that already had usable inference (Claude Code/Codex logins, API keys). Setting up "an agent with intelligence" required clicking through menus instead of talking to it.

Why This Change Was Made

Inference is the only required step; everything else can default or happen conversationally. Crestodian (the configless-safe setup custodian) becomes the default onboarding on all surfaces and now runs as a real agent on the production embedded agent loop, restricted to a single ring-zero crestodian tool:

  • CLI: interactive openclaw onboard / bare openclaw (fresh install) opens the conversation. First-run welcome states the detected plan (login-aware Claude Code/Codex detection via src/commands/onboard-inference.ts, keychain-safe); yes applies model + workspace + bootstrap files + quickstart gateway + service install (src/crestodian/setup-apply.ts, audited). Classic wizard: --classic or any explicit step flag; --non-interactive unchanged; --modern = deprecated alias for openclaw crestodian.
  • Agent loop (src/crestodian/agent-turn.ts, src/agents/tools/crestodian-tool.ts): same runner, session transcripts, and tool pipeline as regular agents; the tool is construction-gated (RunEmbeddedAgentParams.crestodianTool + toolsAllow) so normal agents can never receive it. Mutations require approved=true asserted from explicit user consent, are audited, and post-write config validation feeds schema errors back into the loop for in-conversation self-repair. Fallback ladder: agent loop → single-turn persona planner → deterministic typed commands.
  • Config correctness: config get (secret-redacting) and config schema read ops ground the model in the real zod schema; writes are schema-validated with exact errors surfaced back into the chat; the engine re-validates openclaw.json after every applied write.
  • macOS app: the gateway step-wizard page is replaced by the Crestodian chat over a new additive crestodian.chat gateway method (operator.admin scoped, works before any model auth exists — fixes the dead-end). Permissions page importance-sorted, fits without scrollbars, auto-refreshes. Onboarding version bumped.
  • Web install: install.sh already ends in openclaw onboard, so it inherits the conversation; docs synced.
  • Bugs found by testing, fixed: configless Codex app-server fallback was dead on arrival (tools.exec.mode=deny floor + tools hidden behind the tool-search index); Crestodian channel listing was empty in packaged installs; setup approval now seeds the crestodian-scoped exec approval that local model harnesses require.

User Impact

Fresh install → talk to a custodian with personality that already found your AI access; say yes; connect channels by chatting; meet your agent. Existing installs are untouched (config-authored setups keep opening the TUI/app; old app versions still get the classic wizard RPC; no config shape changes, no doctor migration needed).

Evidence

  • Unit/typecheck: pnpm tsgo, pnpm check:test-types, pnpm tsgo:extensions green; 165+ tests across src/crestodian, src/agents/tools/crestodian-tool.test.ts, src/wizard, src/commands/onboard*, src/gateway/server-methods/crestodian.test.ts, src/cli/run-main.test.ts; 18/18 Swift onboarding tests (incl. new permission-order regression) + swift build.
  • Fresh-machine e2e (Parallels "macOS Tahoe", real npm pack tarball, isolated state): openclaw onboard → conversation with detection → yes wrote openclaw.json (model, gateway token) + workspace bootstrap files; channels lists 28 channels; connect telegram hosts the wizard in-chat.
  • Live agent loop (host, Codex login, isolated state): custodian ran on the embedded loop via the Codex app-server harness, made 10 audited crestodian tool calls, reported real machine state, and proposed the next mutation behind approval.
  • Verification loop live: gateway.port = "banana" → exact zod error into the chat; unknown key rejected; config get gateway.auth redacts the token; invalid-after-write drives an approval-gated fix proposal (unit-tested).
  • Remote broad gate (pnpm check:changed via Testbox-through-Crabbox) started; Docker lanes test:docker:crestodian-{first-run,planner,rescue} should run in CI before merge. Known gap: claude-cli harness sessions use the planner fallback until the MCP tool bridge lands (follow-up filed).

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: macos App: macos app: web-ui App: web-ui gateway Gateway runtime cli CLI command changes commands Command implementations agents Agent runtime and tooling extensions: codex size: XL maintainer Maintainer-authored PR labels Jul 4, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e3ceef35b5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/crestodian/onboarding-welcome.ts Outdated
workspace?: string;
}): Promise<string> {
const overview = await params.engine.loadOverview();
const isConfigured = overview.config.exists && overview.config.valid && overview.defaultModel;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Badge Require setup completion before skipping bootstrap

When a user has a valid minimal config that only sets a default model (for example from a previous config set or import) but has not completed onboarding, this condition treats the install as already configured and returns the “agent is ready” welcome instead of seeding the setup proposal. That skips the workspace, gateway defaults, and security acknowledgement that the first-run setup path is supposed to apply, leaving onboarding apparently complete while core setup is still missing.

Useful? React with 👍 / 👎.

"set_default_model",
"config_set",
"config_set_ref",
"create_agent",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Badge Map create_agent to the create-agent operation

The tool schema advertises create_agent to the Crestodian agent, but operationForAction has no matching case, so any approved tool call for agent creation falls through to the default “unknown action” error instead of executing the existing create-agent operation. This breaks the documented mutating action in the real agent-loop path even though typed chat commands can still parse create agent ....

Useful? React with 👍 / 👎.

guard pageIndex == self.crestodianPageIndex else { return }
// Local mode reaches this page only after the CLI/gateway install page,
// so the gateway is up before the first RPC.
guard self.state.connectionMode != .local || self.cliInstalled else { return }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Badge Respect paused local mode before starting chat

In local onboarding while OpenClaw is paused, the old wizard path deferred setup because the gateway is intentionally stopped, but this guard only checks cliInstalled before issuing the crestodian.chat RPC. Since GatewayConnection.request auto-recovers local failures by calling GatewayProcessManager.setActive(true), simply opening this page can restart a paused gateway instead of showing/respecting the paused setup state.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4258c98245

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/commands/onboard.ts Outdated
Comment on lines +33 to +38
return (
opts.classic === true ||
opts.flow !== undefined ||
opts.mode === "remote" ||
opts.importFrom !== undefined ||
opts.authChoice !== undefined

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Badge Route explicit onboard flags through the classic wizard

For interactive runs that pass existing setup flags but no --classic/--flow (for example openclaw onboard --gateway-port 19000 or --no-install-daemon), this predicate returns false and setupWizardCommand routes to runConversationalOnboarding, which only forwards workspace. The Crestodian setup path then calls ensureGatewayServiceForOnboarding with opts: {}, so gateway port/auth/daemon choices are silently replaced by quickstart defaults even though those public flags were honored by the previous wizard path. Please either treat any explicit setup flag as classic here or thread the flags through the conversational setup.

Useful? React with 👍 / 👎.

Comment on lines +173 to +174
var canAdvance: Bool {
!self.isCLIBlocking && !self.isWizardBlocking
!self.isCLIBlocking

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Badge Block advancement until Crestodian setup completes

In local onboarding, once the CLI page is done this makes the Next button enabled on the Crestodian setup page even before the user has accepted or completed the pending setup proposal. Because handleNext also no longer has a setup guard, a user can skip straight through permissions/Finish and markComplete() records onboarding as seen while no workspace, gateway defaults, or security acknowledgement were applied; the previous wizard path kept canAdvance false until the wizard completed.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d2a44829c4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +94 to +102
const nextConfig = await setupChannels(baseConfig, defaultRuntime, prompter, {
initialSelection: [channel],
forceAllowFromChannels: [channel],
allowSignalInstall: true,
deferStatusUntilSelection: true,
quickstartDefaults: true,
skipDmPolicyPrompt: true,
skipConfirm: true,
});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Badge Run channel post-write hooks from chat setup

When the chat-hosted setup configures a channel whose adapter has afterConfigWritten (Matrix encrypted accounts currently do: extensions/matrix/src/onboarding.ts:754 runs verification bootstrap), this path calls setupChannels and immediately writes the config without passing onPostWriteHook or draining runCollectedChannelOnboardingPostWriteHooks like channels add does. The chat can then report the channel as configured while the required post-write bootstrap never runs, leaving encrypted Matrix accounts without their recovery/backup setup.

Useful? React with 👍 / 👎.

Comment on lines +72 to +75
let data = try await GatewayConnection.shared.request(
method: "crestodian.chat",
params: params,
timeoutMs: 120_000)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Badge Keep macOS chat timeout above server turns

When Crestodian takes the real agent-loop path, the gateway can wait up to 180s for the turn (src/crestodian/chat-engine.ts:213), and the embedded run itself is allowed 120s (src/crestodian/agent-turn.ts:21). This macOS request times out at exactly 120,000ms, so a cold or slow local model turn can time out in the app before the gateway response arrives, showing an error while the server-side setup turn continues. Please either raise this client timeout above the server deadline or lower the server deadline for this RPC.

Useful? React with 👍 / 👎.

@clawsweeper

clawsweeper Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Codex review: found issues before merge. Reviewed July 4, 2026, 7:13 PM ET / 23:13 UTC.

Summary
this PR makes Crestodian conversational onboarding the default across CLI, web install, and macOS, adding a Gateway chat method, embedded agent-loop setup, a ring-zero Crestodian tool, and related docs/tests.

PR surface: Source +2108, Tests +869, Docs +78, Other -282. Total +2773 across 76 files.

Reproducibility: yes. source-level: current PR head still contains the patched paths that append sensitive replies, preserve stale proposalRef state on decline, skip post-write channel hooks, default away from existing workspace config, terminalize wizard validation errors, share one transcript file, and mismatch client/server deadlines.

Review metrics: 3 noteworthy metrics.

  • PR size: +4259/-1486 across 76 files. The change spans CLI, Gateway protocol, agents, macOS, docs, and tests, so review must account for cross-surface behavior rather than a local patch.
  • Public setup surfaces: 1 default onboarding path changed, 1 Gateway method added, 1 classic flag path retained. First-run setup, app onboarding, and public CLI flags are compatibility-sensitive user entry points.
  • Ring-zero mutation surface: 1 built-in agent tool added. The new tool can mutate config and setup state, so approval and secret-handling behavior matter beyond unit test success.

Stored data model
Persistent data-model change detected: migration/backfill/repair: src/agents/tools/crestodian-tool.ts, migration/backfill/repair: src/cli/program/register.onboard.ts, serialized state: apps/macos/Tests/OpenClawIPCTests/OnboardingWizardStepViewTests.swift, serialized state: src/agents/tools/crestodian-tool.ts. Confirm migration or upgrade compatibility proof before merge.

Merge readiness
Overall: 🧂 unranked krab
Proof: 🦞 diamond lobster ✨ media proof bonus
Patch quality: 🧂 unranked krab
Result: blocked by patch quality or review findings.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P2] Fix the security-boundary blockers around sensitive replies and stale approval state.
  • Preserve classic setup contracts for workspace defaults, channel post-write hooks, wizard validation, and non-input steps.
  • Refresh macOS plus focused CLI/channel proof after the fixes.

Mantis proof suggestion
A short macOS visual proof would materially help verify first-run chat redaction, setup gating, and decline/cancel behavior after fixes. A maintainer can ask Mantis to capture proof by posting this exact PR comment:

@openclaw-mantis visual task: verify macOS first-run Crestodian onboarding redacts sensitive channel wizard replies, preserves setup completion gating, and shows no stale approval after cancel/decline.

Risk before merge

  • [P1] Merging current head can expose setup secrets in macOS chat transcripts and leave stale approved tool proposals after a user declines a mutation.
  • [P1] Merging current head can overwrite an existing configured workspace during onboarding and skip channel post-write bootstrap needed by Matrix encrypted accounts.
  • [P1] Merging current head can make hosted channel setup stall or abort on non-input and validation steps that the existing wizard flow handles interactively.
  • [P2] Merging current head can leak prior Crestodian transcript context across chat sessions and show macOS timeout errors while the Gateway turn is still running.

Maintainer options:

  1. Fix the onboarding safety blockers first (recommended)
    Repair the secret redaction, stale approval clearing, workspace preservation, channel hook, wizard validation, session isolation, and timeout blockers before asking for merge.
  2. Split the security boundary from the product rollout
    Maintainers can ask for a narrower PR that lands the safe Crestodian/Gateway primitives separately from making conversational onboarding the default.
  3. Pause if the broader replacement is no longer preferred
    If maintainers choose feat(onboard): streamline setup with agent-assisted configuration #93265 or another implementation path instead, pause or close this PR after preserving any unique tests or proof that still apply.

Next step before merge

  • [P2] Human maintainer review is needed because this protected maintainer-labeled PR changes default onboarding, auth/provider setup, Gateway chat, and ring-zero mutation behavior with unresolved security and compatibility blockers.

Security
Needs attention: The diff introduces concrete security-boundary concerns in setup secret handling and approval-gated mutation state.

Review findings

  • [P1] Redact sensitive wizard replies before storing them — apps/macos/Sources/OpenClaw/OnboardingCrestodianChat.swift:51
  • [P1] Clear stale tool proposals on decline — src/crestodian/chat-engine.ts:300-302
  • [P1] Preserve the existing workspace default — src/crestodian/onboarding-welcome.ts:53-55
Review details

Best possible solution:

Land only after chat onboarding preserves the classic wizard contracts for secret handling, workspace defaults, channel hooks, validation, session reset, and deadline alignment, with refreshed macOS/CLI/channel proof.

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

Yes, source-level: current PR head still contains the patched paths that append sensitive replies, preserve stale proposalRef state on decline, skip post-write channel hooks, default away from existing workspace config, terminalize wizard validation errors, share one transcript file, and mismatch client/server deadlines.

Is this the best way to solve the issue?

No: the direction is plausible for #99934, but this is not yet the best mergeable fix because it regresses existing setup contracts and security boundaries that the old wizard and channel setup paths already handled.

Full review comments:

  • [P1] Redact sensitive wizard replies before storing them — apps/macos/Sources/OpenClaw/OnboardingCrestodianChat.swift:51
    This appends every user reply to the visible macOS chat before the Gateway/engine can say whether the active hosted wizard step is sensitive. Channel and plugin tokens that the old wizard entered via SecureField are now stored/displayed as plain chat bubbles; the host needs sensitive-step metadata or a redacted echo before appending.
    Confidence: 0.95
  • [P1] Clear stale tool proposals on decline — src/crestodian/chat-engine.ts:300-302
    Decline only clears this.pending; model-loop proposals live in agentSession.proposalRef.current. A later bare yes arms the tool path and can apply the stale registered mutation the user declined, so clear both proposal stores on decline, supersede, and apply.
    Confidence: 0.91
  • [P1] Preserve the existing workspace default — src/crestodian/onboarding-welcome.ts:53-55
    For valid partial configs with agents.defaults.workspace, the first-run proposal falls back to DEFAULT_WORKSPACE unless --workspace was passed. Accepting setup can silently move an existing configured workspace; read the current workspace as the proposal default like the classic quickstart path does.
    Confidence: 0.87
  • [P2] Run channel post-write hooks after chat setup — src/crestodian/chat-engine.ts:94-103
    This setup path writes channel config without collecting or draining afterConfigWritten hooks. Matrix encrypted setup uses that hook for bootstrap, so chat can report the channel configured while required post-write work is skipped.
    Confidence: 0.92
  • [P2] Keep validation failures inside the hosted wizard — src/crestodian/chat-engine.ts:588-589
    If session.answer throws on semantic validation, the runner moves WizardSession to error and the next pump clears the bridge. A single typo aborts setup instead of re-rendering the current prompt with the validation message.
    Confidence: 0.88
  • [P2] Auto-advance non-input wizard steps — src/crestodian/chat-engine.ts:568
    Note, progress, and action steps are rendered as chat prompts and only advance after arbitrary user input. Completion notes can suspend before config write/audit, making setup look finished while it is not saved.
    Confidence: 0.83
  • [P2] Isolate Crestodian transcripts per chat session — src/crestodian/agent-turn.ts:66
    Every session and reset reuses state/crestodian/sessions/agent.jsonl; the embedded loop can inherit prior chat history despite new crestodian.chat session IDs. Use per-session transcript paths or truncate/reset the transcript when the host resets.
    Confidence: 0.86
  • [P2] Keep the app timeout above the server deadline — apps/macos/Sources/OpenClaw/OnboardingCrestodianChat.swift:72-75
    The macOS client times out at 120s while Gateway chat waits up to 180s for an agent-loop turn. Slow local setup can show an app error while the server keeps processing; align the deadlines or lower the server wait for this RPC.
    Confidence: 0.78

Overall correctness: patch is incorrect
Overall confidence: 0.9

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against dd6bc2ec32fa.

Label changes

Label justifications:

  • P0: The PR targets first-run onboarding and auth/provider setup, where a non-technical user can otherwise be blocked before first useful run.
  • merge-risk: 🚨 compatibility: The diff changes default onboarding, workspace defaults, wizard behavior, Gateway protocol surface, and session handling for existing setup flows.
  • merge-risk: 🚨 auth-provider: The diff changes first-run model/auth detection and default provider setup decisions across CLI and macOS onboarding.
  • merge-risk: 🚨 security-boundary: The diff adds approval-gated ring-zero mutations and currently exposes sensitive wizard answers and stale proposal state.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🦞 diamond lobster and patch quality is 🧂 unranked krab.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (linked_artifact): The PR body includes after-fix proof from a fresh-machine Parallels macOS run, live Codex agent-loop run, and validation loop output; proof should be refreshed after the blockers are fixed.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes after-fix proof from a fresh-machine Parallels macOS run, live Codex agent-loop run, and validation loop output; proof should be refreshed after the blockers are fixed.
Evidence reviewed

PR surface:

Source +2108, Tests +869, Docs +78, Other -282. Total +2773 across 76 files.

View PR surface stats
Area Files Added Removed Net
Source 44 2687 579 +2108
Tests 8 876 7 +869
Docs 6 139 61 +78
Config 0 0 0 0
Generated 0 0 0 0
Other 18 557 839 -282
Total 76 4259 1486 +2773

Security concerns:

  • [high] Sensitive setup answers are echoed in chat — apps/macos/Sources/OpenClaw/OnboardingCrestodianChat.swift:51
    The macOS chat host stores and displays raw hosted-wizard replies before it knows whether the step is sensitive, regressing the old SecureField behavior for tokens and passwords.
    Confidence: 0.95
  • [high] Declined tool mutations can remain armed — src/crestodian/chat-engine.ts:300
    Declining an engine-level proposal does not clear agentSession.proposalRef, so a later bare yes can arm a stale ring-zero tool mutation that the user had already rejected.
    Confidence: 0.91

Acceptance criteria:

  • [P1] After fixes, run focused Crestodian/chat-engine, crestodian-tool, wizard session, channel setup, Gateway crestodian, and macOS onboarding tests through repo wrappers.
  • [P1] After fixes, refresh real macOS first-run proof covering sensitive hosted wizard replies, decline/cancel approval clearing, and setup completion gating.
  • [P1] After fixes, prove Matrix or hook-backed channel setup runs post-write hooks through the chat-hosted path.

What I checked:

Likely related people:

  • steipete: Live PR author and current main history/blame show recent ownership of macOS onboarding, channel setup, and the Crestodian onboarding surface beyond this PR. (role: feature owner and recent area contributor; confidence: high; commits: 5fb8bf2b3dd5, d41cb3aab896, f3b152e0d908; files: apps/macos/Sources/OpenClaw/OnboardingCrestodianChat.swift, apps/macos/Sources/OpenClaw/OnboardingWizard.swift, src/crestodian/chat-engine.ts)
  • gumadeiras: History for afterConfigWritten and Matrix guided setup includes multiple commits by Gustavo Madeira Santana, including the Matrix setup flow that depends on post-write hooks. (role: adjacent Matrix/channel setup contributor; confidence: medium; commits: 9786946b2d46, f69450b170eb, 94693f7ff036; files: extensions/matrix/src/onboarding.ts, src/flows/channel-setup.ts)
  • vincentkoc: Recent history around release/provider and setup-adjacent surfaces appears in the same channel/setup search history, but the direct failing lines are less clearly owned by this contributor. (role: recent adjacent contributor; confidence: low; commits: e085fa1a3ffd; files: src/flows/channel-setup.ts, extensions/matrix/src/onboarding.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
Review history (15 earlier review cycles; latest 8 shown)
  • reviewed 2026-07-04T13:04:09.052Z sha 55e0dfb :: found issues before merge. :: [P1] Reject npm-prefixed local plugin specs | [P1] Route explicit setup flags through a supported path | [P1] Preserve the configured workspace in setup | [P2] Run channel post-write hooks from chat setup | [P2] Respect paused local mode before starting chat | [P2] Keep the app timeout above server turns
  • reviewed 2026-07-04T13:38:23.970Z sha 75acc6e :: found issues before merge. :: [P1] Reject npm-prefixed local plugin targets | [P1] Preserve the existing workspace default | [P2] Run channel post-write hooks from chat setup | [P2] Respect paused local mode before starting chat | [P2] Keep the app timeout above server turns | [P2] Use a distinct transcript per chat session
  • reviewed 2026-07-04T13:58:10.293Z sha 1a4d58c :: found issues before merge. :: [P1] Reject npm-prefixed local plugin targets | [P1] Clear declined Crestodian tool proposals | [P1] Preserve the existing workspace default | [P2] Run channel post-write hooks from chat setup | [P2] Respect paused local mode before starting chat | [P2] Keep the app timeout above server turns
  • reviewed 2026-07-04T14:09:46.831Z sha 4074729 :: found issues before merge. :: [P1] Redact sensitive wizard replies before host transcript echo | [P1] Clear agent-loop proposals when the user declines | [P1] Preserve the existing workspace when proposing setup | [P2] Run channel post-write hooks from chat setup | [P2] Respect paused local mode before starting chat | [P2] Keep the app timeout above the server turn deadline
  • reviewed 2026-07-04T14:15:12.977Z sha 4074729 :: found issues before merge. :: [P1] Redact sensitive wizard replies before host transcript echo | [P1] Clear agent-loop proposals when the user declines | [P1] Preserve the existing workspace when proposing setup | [P2] Run channel post-write hooks from chat setup | [P2] Respect paused local mode before starting chat | [P2] Keep the app timeout above the server turn deadline
  • reviewed 2026-07-04T15:16:26.174Z sha 537ac37 :: found issues before merge. :: [P1] Redact sensitive wizard replies before echoing them | [P1] Clear tool proposals when the user declines | [P1] Preserve the existing workspace default | [P2] Run channel post-write hooks after chat setup | [P2] Respect paused local mode before starting Crestodian | [P2] Keep the app timeout above the server deadline
  • reviewed 2026-07-04T15:24:32.647Z sha 537ac37 :: found issues before merge. :: [P1] Redact sensitive wizard replies before echoing them | [P1] Clear tool proposals when the user declines | [P1] Reject npm-prefixed local plugin specs | [P1] Preserve the existing workspace default | [P2] Run channel post-write hooks after chat setup | [P2] Respect paused local mode before starting Crestodian
  • reviewed 2026-07-04T22:59:14.015Z sha 5fb8bf2 :: found issues before merge. :: [P1] Redact sensitive wizard replies before storing them | [P1] Clear tool proposals when the user declines | [P1] Preserve the existing workspace default | [P2] Run channel post-write hooks after chat setup | [P2] Keep validation failures inside the hosted wizard | [P2] Auto-advance non-input wizard steps

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P0 Emergency: data loss, security bypass, crash loop, or unusable core runtime. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. labels Jul 4, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a6760352c5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/crestodian/onboarding-welcome.ts Outdated
Comment on lines +31 to +33
const workspace = resolveUserPath(params.workspace ?? DEFAULT_WORKSPACE);

params.engine.propose({ kind: "setup", workspace });

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Badge Preserve the configured workspace in setup

When a user already has a valid config with agents.defaults.workspace but is not considered fully configured here (for example no default model yet), default conversational onboarding ignores that existing workspace and seeds the setup proposal with DEFAULT_WORKSPACE; accepting the proposal then calls the setup path that writes this workspace back into config. This regresses the classic wizard behavior, which used the existing configured workspace as the quickstart default, and can silently move an existing user back to ~/.openclaw/workspace unless they remember to pass --workspace.

Useful? React with 👍 / 👎.

Comment on lines +511 to +513
const detected: InferenceBackendCandidate | undefined = candidates.find(
(candidate) => candidate.kind !== "existing-model",
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Badge Skip logged-out CLI candidates during setup

On Linux/Windows with only a claude or codex binary installed but no stored login and no API key/default model, detectInferenceBackends() returns that CLI candidate with credentials === false; this selection still accepts it and setup writes the corresponding default model. The welcome then says it will reuse an installed-but-not-logged-in backend, leaving a fresh onboarding flow configured to a model that cannot run instead of leaving the model unset and prompting the user to log in or add a key.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Codex Review

if (/^(?:\.{1,2}\/|\/|~\/|file:|git(?:\+ssh|\+https)?:|https?:)/i.test(trimmed)) {
// Crestodian does not install local paths or URLs; those can execute arbitrary package code.
return "Crestodian plugin install accepts npm or ClawHub package specs only.";

P2 Badge Reject npm-prefixed local plugin specs

When a Crestodian proposal uses a spec like npm:file:../pkg or npm:https://example/package.tgz, this guard only checks the outer string and lets it through because it starts with npm:. The plugin installer then strips that prefix (src/cli/plugins-command-helpers.ts:219-224) and passes the remaining local/URL spec to npm (src/cli/plugins-install-command.ts:1177-1193), bypassing the Crestodian restriction that plugin installs are npm/ClawHub package specs only. Please validate the inner npm: target as well before executing approved plugin-install actions.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. labels Jul 4, 2026
steipete added 12 commits July 5, 2026 08:52
…letion gate

Review findings: the model-supplied approved flag alone could authorize
ring-zero mutations (prompt injection / model error), and removing the macOS
wizard gate let users Next past the Crestodian page with nothing configured.
Mutating tool actions now also require host-verified consent (the engine arms
approval only when the user's actual message is an explicit yes), and local
macOS onboarding blocks advancing until setup authored the config, using the
same signal the old step wizard checked.
…te dot navigation

A generic yes no longer authorizes arbitrary mutations: denied mutating tool
calls register a canonical operation fingerprint (host-owned, per session),
and an armed turn executes only the identical call, once. The denial message
is arming-aware so the approved turn self-heals in one roundtrip, and the
agent protocol pre-registers proposals. macOS onboarding page dots now honor
the same setup-completion gate as the Next button.
…s, gate programmatic advance

Sensitive channel-wizard answers (tokens, passwords) are redacted from the
AI-visible conversation history; setup and the onboarding welcome never pick
or advertise a definitively logged-out CLI as the model; and macOS
handleNext() honors the page gates for programmatic callers (chat handoff)
just like the Next button.
…with the app gate

A valid config carrying only a default model (partial/hand-written) now still
gets the first-run proposal instead of the ready guide, so the macOS setup
gate can always be satisfied from the conversation.
…osal

An approval-mismatched call inside an armed turn no longer re-registers and
invites a retry (which let the model swap the approved operation for another
in the same turn); it voids the approval entirely and requires a fresh yes.
Proposals register only in unarmed turns, which the agent protocol already
does when proposing.
@steipete
steipete force-pushed the claude/wizardly-ishizaka-7410c7 branch 3 times, most recently from afea355 to bb658a5 Compare July 5, 2026 08:01
@openclaw-barnacle openclaw-barnacle Bot added the scripts Repository scripts label Jul 5, 2026
@steipete
steipete merged commit 07bf384 into main Jul 5, 2026
104 of 107 checks passed
@steipete
steipete deleted the claude/wizardly-ishizaka-7410c7 branch July 5, 2026 08:02

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bb658a5b48

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +89 to +91
const snapshot = await readSetupConfigFileSnapshot();
const baseConfig: OpenClawConfig =
snapshot.valid && snapshot.exists ? (snapshot.sourceConfig ?? snapshot.config) : {};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Badge Refuse setup writes when the existing config is invalid

When openclaw.json exists but fails validation, this discards the parsed snapshot by using {} and then continues to write a fresh setup config. The classic wizard explicitly stops on the same invalid snapshot before writing, because otherwise a small malformed-but-user-authored config can be replaced with only workspace/gateway defaults, dropping agents/channels/settings instead of asking the user to run doctor/repair first.

Useful? React with 👍 / 👎.

const { mutateConfigFile, readConfigFileSnapshot } = await loadConfigFileMutationHelpers();
const { readConfigFileSnapshot } = await loadConfigModule();
const before = await readConfigFileSnapshot();
const workspace = resolveUserPath(operation.workspace ?? process.cwd());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Badge Use the onboarding default workspace for bare setup

When a user runs Crestodian setup without a workspace, this falls back to process.cwd(). In the CLI that is whatever directory they happened to launch from, and in the gateway/macOS path it can be the app/gateway working directory, so accepting the setup writes and bootstraps the wrong agents.defaults.workspace instead of the normal onboarding default or existing configured workspace.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: macos App: macos app: web-ui App: web-ui cli CLI command changes commands Command implementations docs Improvements or additions to documentation extensions: codex gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P0 Emergency: data loss, security bypass, crash loop, or unusable core runtime. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. scripts Repository scripts size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Onboarding re-sync: Crestodian conversation as the default across web install, CLI, and macOS app

1 participant