Skip to content

fix(occ): show the Agent name in the native admin UI - #3876

Merged
freeqaz merged 4 commits into
openclaw:mainfrom
mrunalp:agent-display-name
Oct 27, 2026
Merged

freeqaz merged 4 commits into
openclaw:mainfrom
mrunalp:agent-display-name

Conversation

@mrunalp

@mrunalp mrunalp commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Problem

The Agent name set in the OCC Console does not reach the OpenClaw native admin UI, which keeps showing the stock name "Assistant".

The pinned OpenClaw Gateway (src/gateway/assistant-identity.ts) resolves the assistant name from agents.entries.<id>.identity.name of the first roster entry (or main when the roster is omitted), then the Name: line of the workspace IDENTITY.md, then the default "Assistant". OCC wrote neither from the Agent's name.

Change

Deployment now saves the OCC Agent name as the served OpenClaw Agent's display name in the revision snapshot (AgentRevision.configuration):

  • One roster entry: OCC sets that entry's identity.name.
  • Omitted roster: OCC adds agents.entries.main with only identity.name, the main entry the Gateway already serves.
  • Unchanged: an entry whose identity.name the Configuration sets, a roster with several entries, and the reusable Configuration.

withAgentIdentityName (packages/occ/src/openclaw-roster.ts) applies this after every admission check, when OCC freezes the snapshot. Refusals therefore name only settings the Configuration writes: an added main entry would otherwise make a draft with no model fail on agents.entries.main.model. No Driver contract changes; Compute Drivers receive the snapshot as before.

OpenClaw consequences of identity.name:

  • The Control UI shows at most 50 characters.
  • The system prompt includes it as the Agent name.
  • Channel replies get a [name] prefix only when responsePrefix: "auto" is set.
  • An entry with only identity adds no tool policy.

Also in this PR:

  • scripts/first-agent.mjs checks each revision snapshot exactly and now expects the name.
  • Snapshot assertions share a helper in tests/helpers/agent-identity.mjs.
  • A new conformance test checks that a name the Configuration sets is kept.
  • The native admin k3d proof checks the served bootstrap configuration's assistantName.
  • Docs: the revision contract (docs/reference/agents/deployment.md), the deployment flow, the Configuration reference, and the Console Agent details guide.

Verification

Local, on the branch before merging main (base 09e9cb6e4), with its matching dependency install:

  • Passed: configuration-occ 33/33, secret-occ 20/20, controller-lifecycle 41/41, configuration-controller 251/251, occ-api 74/74, first-agent-startup 10/10.
  • Typecheck, ESLint and Prettier pass on the changed files.
  • Full conformance: 3054/3065 pass. The 11 failures also fail without this change or come from the local sandbox (read-only /tmp, socket binds, missing gh, OpenShell gRPC, file modes).
  • Full integration: about 145 failures, all sandbox networking, CI tooling and k3d fixture setup. None involve the revision snapshot.

After merging main (96d90e2cb):

  • The only conflict was an import block in configuration-occ.test.mjs.
  • Main updated dependency manifests, which I did not install. With the previous install, the merged branch and plain main fail the same set of configuration-occ, controller-lifecycle, configuration-controller and occ-api cases. The merged branch has one extra pass, the new name test. CI must confirm with the current dependencies.

Real k3d, gateway-routing lane prepared with scripts/ci/prepare.mjs, model gpt-6.1-sol, images built from 31e879772, before main was merged; not rerun at this head:

  • production native admin UI opens through OCC and preserves Agent boundaries:
    • The new assertion passed: the Gateway's served data-openclaw-bootstrap-config has assistantName equal to the Agent name cut to 50 characters.
    • Its screenshot after a real chat turn shows the composer placeholder Message production-dedicated-fc453984-c1c1-4039-9837-37952 instead of Message Assistant.
    • The case then failed at its final step: assertManagedNativeConfigWriteRejected timed out waiting for Config is externally managed. Not investigated; I have not established whether it also fails on main. The check was added in feat: add Gateway managed mode to Agent deployments #2982, before feat(runtime): apply Gateway tool policy to dedicated OCE deployments #2633 moved the OpenClaw pin.
  • two people share an embedded native Gateway with selective stream withdrawal: passed.
  • production dedicated Codex consumes Envoy-routed workspace files through OCC: not rerun after the memory fix.
  • Run conditions:

Not run:

  • pnpm docs:check and pnpm docs:check-length: the local install lacked the docs-site packages. docs/reference/agents/deployment.md was near the 2,500-word limit before this change.
  • The native admin screenshot is not attached yet.

Risks

  • Revisions deployed before this change keep "Assistant" until the Agent is deployed again.
  • The first-agent helper refuses a revision without the name ("changed outside this helper") until that Agent is redeployed.
  • For an omitted roster, the Gateway now gets an explicit main entry. OpenClaw serves main either way, and the entry inherits agents.defaults. Topology, workspace setup and tool policy rules treat it like the implicit roster.
  • The Agent name reaches the model through the system prompt.

🤖 Generated with Claude Code

mrunalp and others added 3 commits October 27, 2026 01:03
The OpenClaw Control UI reads its assistant name from the served Agent's
identity.name and falls back to "Assistant". OCC never wrote one, so the
native admin UI ignored the name set in the OCC Console.

Deployment now saves the OCC Agent name as the sole roster entry's
identity.name in the revision snapshot, under agents.entries.main when
the roster is omitted. A name the Configuration sets wins, a roster of
several entries is unchanged, and the reusable Configuration is not
modified. The name is added after admission checks, so refusals name
only settings the Configuration writes.

The native admin k3d proof now checks the Gateway bootstrap document's
assistantName. Snapshot assertions and the first-Agent helper expect the
added name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pinned Control UI boots from the bootstrap configuration the Gateway
embeds in the served document (data-openclaw-bootstrap-config) and fetches
control-ui-config.json only on a later refresh, so the first assertion
never observed a response. Read the embedded configuration instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@clawsweeper

clawsweeper Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review blocked

Automated review did not run, so no review verdict was produced.

Reason: The input-safety check rejected material in this revision. No detected value, path, or scanner output is reproduced here.

Automatic review is on hold, including after source changes. Request a fresh re-review after resolving the failure; maintainers can also release the hold through an intentional scanner-policy update.

Next step: If this is a genuine credential, remove and rotate it. If it is an intentional test fixture, a maintainer must review and qualify it.

View the workflow run.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 27, 2026
The PostgreSQL Kubernetes platform-state test compares revision
snapshots and stored draft specs exactly; they now carry the main entry
named after the Agent. Kubernetes Compute pins the dedicated Codex
Gateway workspace on that main entry as well as on the defaults, so the
real-cluster native document expectation does the same.

Shorten the Configuration reference sentence that took the page one
word past the 2,500-word hard limit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mrunalp

mrunalp commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor Author

The ClawSweeper input-safety hold on this PR is a false positive in an existing fixture, not material this PR adds.

  • TruffleHog 3.99.4 (the version the review run installs), run on the full contents of this PR's changed files at the reviewed head 5aa21d311, reports one unverified JDBC finding at tests/integration/configuration-controller.test.mjs:3779.
  • That line predates this PR (abf66479c) and is unchanged on main. It is one entry in a table of synthetic environment values: a jdbc:postgresql URL on the reserved example.test domain, with a user name and no password.
  • This PR changes that file in one assertion only. The scanner reports no findings in the PR diff, the PR description, or the merge from main.

A maintainer can qualify that fixture line and release the hold, so the automatic review can run.

@mrunalp
mrunalp marked this pull request as ready for review October 27, 2026 16:37
@mrunalp
mrunalp requested a review from a team as a code owner October 27, 2026 16:37

@freeqaz freeqaz 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 (an AI agent working on Free's behalf). Comment-only review of 476983cf7f.

Summary: correct, and the snapshot tests are updated. Nothing blocks landing.

  • withAgentIdentityName: it leaves these unchanged: agents.list shapes, non-object agents/entries/identity, empty or multi-entry rosters, and an entry that already sets identity.name. It runs after every admission check, and the result is frozen with frozenValues. OpenClaw's IdentitySchema takes name as any string. Its roster rules also treat an entry without model as sharing agents.defaults, so the added main entry does not change model selection.
  • k3d and PostgreSQL snapshot tests: the earlier head failed postgres-platform-state-kubernetes deep-equal checks on the new entries.main.identity.name. 476983cf7 updates that file and kubernetes-compute-real.mjs. On this head, CI Required is green, including k3d State and Lifecycle, k3d Fixture and Configuration, PostgreSQL Platform and First Agent Smoke. The PR merges cleanly with main.
  • Verification: configuration-occ and secret-occ conformance passed 56/56 with 0 skipped on a remote test VM.

Non-blocking:

  • No test covers the two "unchanged" cases the description lists: a roster of several entries, and a single non-main entry key (which should get the name). A small case for each in configuration-occ.test.mjs would protect the rules described in deployment.md.
  • first-agent-model.mjs replaces expected.agents.entries wholesale. That is right for the helper's own Configuration, which has no roster. If that Configuration ever gains entries, the exact-match check will refuse every revision. A short comment there would help.
  • native-admin-k3d-real is not in CI. The description says its final assertManagedNativeConfigWriteRejected step timed out and was not compared with main. It would be good to know whether main fails the same way before relying on that file.

@freeqaz
freeqaz merged commit 08f3658 into openclaw:main Oct 27, 2026
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants