Repository navigation
feat(setup): rename Crestodian to OpenClaw system agent - #107320
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 367ea839ce
ℹ️ 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".
| textAlias: "/crestodian", | ||
| key: "openclaw", | ||
| description: "Run the OpenClaw setup and repair helper.", | ||
| textAlias: "/openclaw", |
There was a problem hiding this comment.
Preserve the retired /crestodian chat alias
When existing users send the previously shipped /crestodian ... rescue command over text channels, the dispatcher only recognizes aliases declared in the command registry before handleSystemAgentCommand runs. This entry now registers only /openclaw, so /crestodian status or /crestodian yes is no longer treated as the setup/repair command and can fall through instead of reaching the compatibility path; keep /crestodian as a secondary textAliases entry while canonicalizing to /openclaw.
Useful? React with 👍 / 👎.
367ea83 to
6373fdd
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6373fdd0d5
ℹ️ 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".
| @@ -92,7 +92,7 @@ const legacyStorePatterns = [ | |||
| /\b(?:credentials\/oauth|github-copilot\.token|openrouter-models|auth-profiles|auth-state|exec-approvals|workspace-state)\.json\b/u, | |||
| /\bcron\/(?:runs\/[^"'`]+\.jsonl|jobs\.json|jobs-state\.json)\b/u, | |||
| /\b(?:process-leases|session-toggles|known-users|msteams-conversations|msteams-polls|msteams-sso-tokens|bot-storage|sync-store|thread-bindings|inbound-dedupe|startup-verification|storage-meta|crypto-idb-snapshot|command-deploy-cache|plugin-binding-approvals|plugins\/installs|config-health|port-guard|restart-sentinel|gateway-restart-intent|gateway-supervisor-restart-handoff)\.json\b/u, | |||
| /\b(?:calls|ref-index|audit\/file-transfer|audit\/crestodian)\.jsonl\b/u, | |||
| /\b(?:calls|ref-index|audit\/file-transfer|audit\/openclaw)\.jsonl\b/u, | |||
There was a problem hiding this comment.
Keep the legacy-store guard matched to the audit path
When the database-first legacy-store guard runs, this pattern now looks for audit/openclaw.jsonl, but the renamed runtime audit helper writes audit/system-agent.jsonl (src/system-agent/audit.ts). That means current or future system-agent JSONL audit writes bypass this guard instead of being reported, so the database-first check no longer enforces the renamed store; update the pattern to match the actual system-agent path or rename the runtime path consistently.
Useful? React with 👍 / 👎.
6373fdd to
c9865ee
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c9865eee18
ℹ️ 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".
| "openclaw.chat", | ||
| "openclaw.setup.detect", | ||
| "openclaw.setup.verify", | ||
| "openclaw.setup.activate", | ||
| "openclaw.setup.auth.start", |
There was a problem hiding this comment.
Keep retired gateway methods registered
When a native client or SDK still sends the shipped crestodian.chat / crestodian.setup.* RPC names, only the new openclaw.* keys are registered here, so the gateway dispatcher falls through to unknown method. macOS/Android apps and remote gateways can be upgraded independently, so a gateway-only upgrade breaks existing onboarding clients; keep the retired method names as aliases to these same handlers until a versioned removal.
Useful? React with 👍 / 👎.
| const reservedAgent = runtimeConfig.agents?.list?.find((entry) => | ||
| isReservedSystemAgentId(entry.id), |
There was a problem hiding this comment.
Migrate existing openclaw agent ids before reserving them
For an upgraded install that already has a user-created agent with id openclaw (valid before this rename; only crestodian was previously reserved), this new check makes system-agent setup fail and tells the user to rename it manually. The added doctor migration only moves the top-level crestodian config block, while the agent creation checks only block future ids, so existing configs hit a setup blocker without doctor --fix; add an automatic migration/rename or use a non-colliding internal id before failing here.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f8dc6bcd64
ℹ️ 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".
| guard self.isCurrentAttempt(context), !Task.isCancelled else { return } | ||
| let data = try await gateway.request( | ||
| method: "crestodian.setup.detect", | ||
| method: "openclaw.setup.detect", |
There was a problem hiding this comment.
Fall back to legacy setup methods for older gateways
When a newer macOS app connects to a gateway that has not been upgraded with this rename, the protocol version is still 4 so the handshake succeeds, but the older gateway only advertises/handles the shipped crestodian.setup.*/crestodian.chat RPCs. Hard-coding openclaw.setup.detect here (and the sibling verify/activate/auth/chat calls) makes onboarding fail with unknown method instead of using the server's advertised method set or falling back to the retired names, which breaks app-before-gateway upgrades.
Useful? React with 👍 / 👎.
f11854a to
17d3000
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 17d3000bc3
ℹ️ 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".
| const result = await request<CrestodianSetupDetectResult>({ | ||
| method: "crestodian.setup.detect", | ||
| const result = await request<SystemAgentSetupDetectResult>({ | ||
| method: "openclaw.setup.detect", |
There was a problem hiding this comment.
Add legacy fallback for remote setup RPCs
When a newer CLI runs remote onboarding against a gateway that is still protocol-compatible (version 4) but predates this rename, this first request now sends only openclaw.setup.detect; that older gateway only handles crestodian.setup.detect, so remote AI setup fails with unknown method before detection. The macOS client path has the same upgrade-order issue already noted, but this separate CLI path also needs to use the advertised method set or retry the retired crestodian.setup.*/crestodian.chat names.
Useful? React with 👍 / 👎.
| capabilities: [ | ||
| GATEWAY_SERVER_CAPS.CHAT_SEND_ROUTING_CONTRACT, | ||
| GATEWAY_SERVER_CAPS.CRESTODIAN_SETUP_MODEL_REF, | ||
| GATEWAY_SERVER_CAPS.SYSTEM_AGENT_SETUP_MODEL_REF, |
There was a problem hiding this comment.
Advertise the retired setup-model capability too
When an older macOS app connects to an upgraded gateway, the protocol version still matches, but that app checks for the shipped crestodian-setup-model-ref capability before including modelRef in activation. This hello now advertises only openclaw-setup-model-ref, so older clients silently omit the exact model guard and can activate the route default instead of the candidate they detected; keep the retired capability string in the list until old native clients are no longer accepted.
Useful? React with 👍 / 👎.
098cbc2 to
332ed32
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 332ed32699
ℹ️ 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".
| if (!snapshot.valid) { | ||
| return true; |
There was a problem hiding this comment.
Route invalid configs to onboarding
When openclaw setup is run against an existing but invalid config, this classifies the install as configured and routes bare interactive/--json setup into the system-agent path. That path cannot actually repair this state: verifySetupInference returns a format failure for invalid snapshots and the guided fallback's detectSetupInference throws the same invalid-config error before probing, so the old setup/onboarding recovery path is skipped and users get a failed OpenClaw start instead of the documented onboarding/doctor guidance. Treat invalid snapshots as not configured here, or add an explicit invalid-config repair route before selecting the system agent.
Useful? React with 👍 / 👎.
|
Codex review: needs real behavior proof before merge. Reviewed July 14, 2026, 10:06 AM ET / 14:06 UTC. Summary Reproducibility: yes. for the patch defects: the exact head provides clear source paths for mixed-version RPC failure, the existing-agent-id blocker, lost owner-DM alias, and invalid-config routing failure. No live run was performed or supplied, so this is source reproduction rather than observed runtime reproduction. Review metrics: 3 noteworthy metrics.
Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review findings
Review detailsBest possible solution: Keep the OpenClaw/system-agent naming, but preserve shipped Do we have a high-confidence way to reproduce the issue? Yes for the patch defects: the exact head provides clear source paths for mixed-version RPC failure, the existing-agent-id blocker, lost owner-DM alias, and invalid-config routing failure. No live run was performed or supplied, so this is source reproduction rather than observed runtime reproduction. Is this the best way to solve the issue? No. The rename is directionally coherent, but replacing shipped identifiers under protocol v4 without aliases, migrations, recovery routing, and upgrade proof is not the safest maintainable solution. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against bacad953794b. Label changesLabel changes:
Label justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
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
Review history (2 earlier review cycles)
|
Mantis Telegram Desktop ProofSummary: Mantis captured native Telegram Desktop before/after GIFs showing the rescue command rename from /crestodian to /openclaw.
Motion-trimmed clips: |
332ed32 to
af570bd
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: af570bd907
ℹ️ 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".
| stateDir = resolveStateDir(env), | ||
| ): string { | ||
| return path.join(stateDir, "audit", "crestodian.jsonl"); | ||
| return path.join(stateDir, "audit", "system-agent.jsonl"); |
There was a problem hiding this comment.
Preserve the legacy audit log path during the rename
When an upgraded install already has approved-write history in the shipped audit/crestodian.jsonl, this resolver now sends both new writes and the audit command's reported path to audit/system-agent.jsonl. I searched for audit/crestodian.jsonl and found no runtime or doctor migration/import for that file, so operators following the post-upgrade audit path miss pre-upgrade approved changes. Add a doctor migration/import or keep reporting/appending through the retired path until the history is carried forward.
Useful? React with 👍 / 👎.
User-facing name is now OpenClaw (the system speaks); internal code name is system-agent. Gateway methods crestodian.* -> openclaw.chat/openclaw.setup.*, agent tool -> openclaw, reserved agent ids openclaw + retired crestodian. openclaw setup routes: onboarding flags -> onboard, -m/--yes -> system agent, bare configured interactive -> OpenClaw chat, unconfigured -> onboarding. Hidden crestodian CLI and /crestodian TUI aliases kept; docs moved to docs/cli/openclaw.md with redirect stub. macOS/Android strings in lockstep. Refs #107237
android:i18n sync drops orphaned entries for the renamed key; wizard zh locales reference openclaw setup; docs title disambiguates the system agent from the product. Refs #107237
Shorten resolvePersistentApplyInference (SystemAgent prefix redundant in module), drop duplicate non-interactive workspace guard in agents add (inner check keeps narrowing and message precedence). Refs #107237
Replace blind string casts with an optionalString reader and rename the options record; blind token/password casts also false-positived secret scanners on every future diff of this file. Refs #107237
Identifiers ending in TOKEN false-positive secret scanners on every diff touching this file; ARG_WORD also describes the grammar role better. Refs #107237
…re /openclaw Review findings on the rename: macOS resume store now migrates activation leases persisted under the retired crestodian UserDefaults key so an app upgrade cannot orphan a live activation; open-tui results carry returnToShell so bare /openclaw re-enters the OpenClaw shell instead of exiting the CLI. Refs #107237
native i18n inventory + per-locale artifacts resynced for the OpenClaw strings; Kotlin gateway protocol enum regenerated instead of hand-edited; deadcode baseline re-sorted; lint suppression allowlist entries moved to sorted position; setup TTY check drops redundant boolean compares; ring-zero first-run e2e calls the real 'openclaw setup' subcommand. Refs #107237
af570bd to
3e771fc
Compare
|
Post-merge CI regression: downstream merge refs now fail Current failures:
Proof: CI job 87166369389 on PR #107670's merge ref. Those paths do not exist in #107670's head, and its prior exact-head lint passed before this main change landed. Please restore the two scoped suppressions or split the files on main so downstream PRs can pass hosted gates again. |
|
Follow-up: simply restoring the two inline suppressions is not sufficient. |




What Problem This Solves
Phase 0 of #107237. "Crestodian" doesn't communicate what it is — users don't get that it's the system itself they're talking to. Before building agent→system-agent delegation (later phases of #107237), the name and entry points move to OpenClaw: users talk to openclaw, because openclaw is the system.
Why This Change Was Made
openclaw; gateway methodsopenclaw.chat/openclaw.setup.detect|activate|verify|auth.start; reserved agent idsopenclaw+ retiredcrestodian; MCP stdio toolmcp__openclaw__openclaw; docs atdocs/cli/openclaw.md(old page is aredirect:stub).src/crestodian/→src/system-agent/,Crestodian*identifiers →SystemAgent*— bareopenclawidentifiers would be ungreppable in this repo, so the internal concept name is "system agent". No third name introduced.openclaw setupis now the canonical entry. Routing: any onboarding flag → onboarding exactly as before (all documented snippets keep working);-m/--yes→ system-agent one-shot; bare on a configured system (interactive TTY, or--jsonfor the overview) → OpenClaw chat, including invalid-config systems (repair assistant); unconfigured → onboarding as today.openclaw crestodianstays as a hidden deprecated alias; TUI keeps hidden/crestodian→/openclaw.User Impact
openclaw setupon a configured system now opens the OpenClaw system-agent chat instead of re-running onboarding (onboarding remains reachable via flags oropenclaw onboard). Everything else is a rename: docs redirect covers old links; hidden aliases cover old habits.Evidence
crestodianreferences are only: hidden CLI/TUI aliases, retired-id reservation, doctor migration, docs redirect stub, and generated non-English locale files (retranslation sync in follow-up commit on this PR).Validation:
node scripts/run-vitest.mjs): src/system-agent (all), setup CLI routing (13), agents add (incl. reserved-id gates), gateway system-agent methods, harness selection, system-agent tool, operations (incl. new bare-/openclaw regression test) — green.pnpm buildgreen;check:changedLOC ratchet fixed in follow-up commits and re-verified locally./openclawexit) — both fixed; fix-delta re-review clean. Two mechanically-moved files excluded from the bundle were verified by symmetric blob-diff (80/80, 73/73 rename-only lines).android-app-i18n sync; check green.