Repository navigation
Description
Summary
Overhaul the OpenClaw system agent ("Ask OpenClaw" / Setup chat): reuse the regular chat's presentation layer, add a durable config change journal (including manual-edit detection), persist the conversation, and make the greeting agentic with a real system identity.
Problem to solve
The custodian Control UI surface hand-rolls its own message bubbles, thinking indicator, markdown pipeline, and composer (ui/src/pages/custodian/custodian-page.ts + ui/src/styles/custodian.css), so it looks worse than the regular chat and duplicates code the chat page already owns. Beyond looks:
- Operators cannot review what changed on their system. The system agent's audit trail (
src/system-agent/audit.ts) is write-only — no read path — and it only covers system-agent writes. Manualopenclaw.jsonedits, doctor migrations, Settings-UI patches, and CLI edits leave no reviewable history. - The conversation is ephemeral by design (process-local 8-session LRU,
src/gateway/server-methods/system-agent.ts), so an admin can't revisit yesterday's setup exchange. - The greeting is a static template bullet wall (
src/system-agent/overview.ts), suggested commands render as inline code the user has to retype, and the agent has no identity, update awareness, or status personality.
Proposed solution
Five independent phases, one PR each:
- UI dedup — render custodian messages through the chat page's
renderMessageGroup+.chat-groupstyles and reuse chat composer styling; delete the bespoke rendering. Keep the custodian-owned state machine (connection scoping, idempotent-retry rule, sensitive masking, option cards, event nudges). - Config change journal — generalize the system-agent audit store into a source-labeled journal appended at the shared config write path (
system-agent,doctor,config-rpc,cli,plugin-install). The existing config hot-reload watcher classifies filesystem changes with no matching internal-write hash asexternal(manual edits) and records key-path diffs viadiffConfigPaths; a single-slot redacted config snapshot enables startup reconciliation for offline edits, including "manual edit made config invalid" entries. Secrets stay path-only via existing redaction. - Journal reader — additive
operator.adminRPC + change cards in the custodian UI ("what changed on my system, when, by whom"). - Durable transcript — move custodian sessions from the process-local LRU into an additive table in the shared state DB as one rolling thread with bounded retention. The engine history is already secret-masked before persistence-eligible; nothing sensitive is stored.
- Agentic greeting + identity — deterministic probes produce a typed facts snapshot (config validity, gateway health,
update.status, channel health); a model phrases the greeting in the OpenClaw system's voice, cached by snapshot hash (zero tokens on unchanged state, template fallback when inference is unavailable — the rescue path never depends on a model). Suggested commands become tappable structured-question chips.
Alternatives considered
- Reusing the full
openclaw-chat-panefor the custodian: rejected — it binds the rescue path to the sessions/runs machinery, threads ~60 session-coupled props, and the custodian transport is a request/response RPC shared by macOS onboarding, Android, and the TUI. - Hash-only manual-edit detection (store a SHA, flag mismatches): subsumed — the watcher's internal-write hash matching plus a redacted snapshot yields real key-path diffs instead of "something changed".
- Making the custodian a regular agent session for persistence: rejected — regular transcripts persist raw turns; the custodian needs masked-only persistence and must work when agent infra is down.
Impact
All Control UI operators (plus macOS/Android/TUI onboarding surfaces for the backend phases). The journal answers the most common ops mystery — "who broke the config and when" — including hand edits made while the gateway was offline. openclaw.chat shipped only in v2026.7.2-beta tags, so surface changes carry no stable-release compat burden; protocol changes stay additive regardless.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Jul 18, 2026
Codex review: this still needs some work.
Summary
Keep this protected maintainer issue open: all five phases shipped, but include-only edits still bypass change-history admission and need an owner-approved follow-up scope.
Reproducibility: Current source establishes that an unchanged root file skips live and startup external-edit records after an include-only edit; no runtime reproduction or tests were run.
Root-cause cluster
Relationship:
canonicalCanonical: #110896
Summary: The five merged phase PRs implement distinct parts of this umbrella; no narrower owner for the remaining include-aware journal coverage was established.
Members:
partial_overlap: refactor(ui): render Ask OpenClaw chat through the shared chat presentation layer #110934 - Implemented shared chat presentation.partial_overlap: feat(config): journal every config change with source labels and manual-edit detection #111147 - Implemented the journal while explicitly deferring include-closure identity and atomic classification.partial_overlap: feat(gateway): system change history RPC and Ask OpenClaw recent-changes panel #111286 - Implemented the change-history reader and UI.partial_overlap: feat(system-agent): durable rolling transcript with openclaw.chat.history #111440 - Implemented durable masked transcript history.partial_overlap: feat(system-agent): agentic cached caretaker greeting with quick actions #111615 - Implemented cached caretaker greetings and quick actions.Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.
Maintainer decision needed
Next step
The feature owner should mark the shipped phases complete and decide where include-only journal coverage belongs, preserving the protected no-new-fix-pr routing.
Review details
Best possible solution:
Retain the shipped rescue-chat design and extend the existing journal to cover include-only changes while preserving bounded, redacted records and accepted diagnostic limits.
Do we have a high-confidence way to reproduce the issue?
Current source establishes that an unchanged root file skips live and startup external-edit records after an include-only edit; no runtime reproduction or tests were run.
Is this the best way to solve the issue?
The phased implementation preserves the rescue boundary; remaining coverage belongs in the existing config journal and source owner, with a failing include-only regression established before choosing storage changes.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning medium; reviewed against e98a15b7d695.
Label changes
Label changes:
issue-rating: 🦞 diamond lobster: Current issue advisory state selects this label.clawsweeper:source-repro: Current issue advisory state selects this label.impact:session-state: Current review impact labels areimpact:other.issue-rating: 🌊 off-meta tidepool: Current issue advisory state no longer selects this label.Label justifications:
P3: The main feature program has shipped; remaining diagnostic coverage has no demonstrated urgent outage.impact:other: Omitted include-only changes reduce the completeness of operator configuration history.Evidence reviewed
What I checked:
src/gateway/config-reload.ts:1004, d6bcf79466f1)src/gateway/config-reload.ts:1411, d6bcf79466f1)src/config/source-file.ts:61, c35b657cf455)How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.Reviewed October 12, 2026, 9:53 AM ET / 13:53 UTC.
jonathanlindsay commentedon Oct 22, 2026
Two small requests for the greeting/identity phase, from a product that embeds the Control UI under its own name:
A host-settable name for the system agent. The greeting hard-codes "Hi, I'm OpenClaw — caretaker of this gateway, config, channels, and agents." (
src/system-agent/overview.ts:318on main; same text in 2026.10.10-beta.2). An app that ships OpenClaw inside its own product has no way to have the caretaker introduce itself under that product's name, so its users meet a name they never installed. A config key (for exampleagents.defaults.systemAgent.displayName, defaulting to "OpenClaw") that the greeting and the panel title read would cover it."Agent:" instead of "Default agent:" for a requester-owned consult. When another agent consults the system agent, the overview's owner is the requester ("an explicit request agentId always wins ... Delegated consults with a requesting agent keep that requester as their owner", docs/gateway/config-agents/heartbeat-compaction-and-streaming.md), but the greeting still prints
Default agent: <requester>(overview.ts:224,:326). Users read that as the install's default agent changing. Labelling it "Agent:" (or "Asked by:") when the owner is the requester, and "Default agent:" only when it really isagents.defaults, would avoid the confusion.Happy to open a PR for either if that helps.
steipete commentedon Oct 24, 2026
Thanks for filing this. We're closing older issues that no longer look actionable on current
main.All five phases of the system agent overhaul have shipped on main. The remaining include-aware change history and the new host-settable system-agent name request should each be tracked as a fresh, focused issue.
OpenClaw has changed a lot since this was filed. If this still affects you on the latest release, please open a fresh issue with your version and repro steps (feel free to link back here).