[Bug]: openclaw status masks and cuts the OPENCLAW_GATEWAY_TOKEN conflict hint
Bug type
Behavior bug (incorrect output/state without crash)
Beta release blocker
No
Summary
When OPENCLAW_GATEWAY_TOKEN and gateway.auth.token hold different values, openclaw status masks the first word of the conflict hint ("Remove") as *** and cuts the line at 160 characters. openclaw doctor shows the same hint in full.
Steps to reproduce
- Set
gateway.auth.tokento a value in config (gateway.modelocal,gateway.auth.modetoken). - Export
OPENCLAW_GATEWAY_TOKENwith a different value in the shell. - Run
openclaw status.
Expected behavior
The whole conflict hint is shown and readable. Secret values stay masked.
Actual behavior
Secret diagnostics:
- OPENCLAW_GATEWAY_TOKEN conflicts with gateway.auth.token: *** OPENCLAW_GATEWAY_TOKEN from the shell, ~/.openclaw/.env, or launchctl env if gateway.auth.token is
"Remove" shows as ***, and the line ends mid-sentence at 160 characters.
OpenClaw version
main at f3638439b92 (2026-11-17), built from source
Operating system
macOS 27
Install method
Source checkout (pnpm build, node openclaw.mjs status)
Model
Not applicable: openclaw status makes no model call.
Provider / routing chain
Not applicable: no provider is involved.
Logs
The output above is from an isolated state dir with synthetic token values. Neither token value appears in the output.
Impact and severity
Low. The hint for a real misconfiguration is unreadable in openclaw status. openclaw doctor shows it in full.
Additional information
The hint joins its title and fix text with ": ", so gateway.auth.token: Remove reads as a key and value to the status and console output redactors. Status also cuts local secret diagnostics at 160 characters.
Codex review: this still needs some work.
Summary Current main still masks “Remove” and truncates the conflict hint; the same-author fix PR remains open, so this issue should stay open.
Reproducibility: Current source establishes both symptoms: the generated “token: Remove” text matches status secret redaction, and the resulting local diagnostic is truncated at 160 units; no live reproduction was run during this read-only review.
Next step Review the existing repair at https://github.com/openclaw/openclaw/pull/200940 for complete hint output and preserved secret masking before resolving this issue.
Review details
Best possible solution:
Show the complete remediation without assignment-shaped prose while retaining secret redaction and terminal sanitization.
Do we have a high-confidence way to reproduce the issue?
Current source establishes both symptoms: the generated “token: Remove” text matches status secret redaction, and the resulting local diagnostic is truncated at 160 units; no live reproduction was run during this read-only review.
Is this the best way to solve the issue?
The linked PR targets both demonstrated causes without weakening shared redaction rules; its broader removal of local diagnostic length limits should be assessed in that PR's review.
AGENTS.md: found and applied where relevant.
Codex review notes: model internal, reasoning medium; reviewed against 0ca4e7d3db4b.
Label changes
Label changes:
- add
P3: This is a low-impact diagnostic readability defect in an advanced CLI workflow, with the complete guidance available through Doctor. - add
impact:ux-friction: Status obscures the repair instruction for a token-source conflict, requiring another diagnostic command. - add
maturity:stable: The primary owner is CLI Observability on the scorecard's M4 CLI surface; documented human secret diagnostics should preserve readable guidance while redacting credentials. - add
issue-rating: 🦞 diamond lobster: Current issue advisory state selects this label. - add
clawsweeper:source-repro: Current issue advisory state selects this label.
Label justifications:
P3: This is a low-impact diagnostic readability defect in an advanced CLI workflow, with the complete guidance available through Doctor.impact:ux-friction: Status obscures the repair instruction for a token-source conflict, requiring another diagnostic command.maturity:stable: The primary owner is CLI Observability on the scorecard's M4 CLI surface; documented human secret diagnostics should preserve readable guidance while redacting credentials.
Evidence reviewed
What I checked:
- Conflict hint resembles a secret assignment: The diagnostic joins its title and remediation with a colon, producing “gateway.auth.token: Remove”. (
src/gateway/auth-token-source-conflict.ts:74, 0ca4e7d3db4b) - Redaction consumes the first instruction word: The status redactor matches token followed by a colon and a non-whitespace value, replacing “Remove” with ***. (
src/commands/status-redaction.ts:7, 0ca4e7d3db4b) - Current status truncation: Command-local diagnostics pass through safeText, which truncates each redacted diagnostic to 160 UTF-16 code units; status prints the resulting entries. (
src/commands/status-overview-values.ts:30, 0ca4e7d3db4b) - Doctor preserves remediation separately: Doctor places the conflict remediation in its own Fix field rather than using the colon-joined diagnostic. (
src/commands/doctor-security.ts:346, 0ca4e7d3db4b) - Open same-author repair: https://github.com/openclaw/openclaw/pull/200940 remains open and unmerged, explicitly relates to this issue, and changes both the diagnostic separator and local diagnostic truncation; its body supplies contributor-reported before/after CLI output. (b556105d1f3a)
- Diagnostic formatting history: The commit adds buildStatusSecretDiagnostics, including the current 160-unit limit and application to local diagnostics, to reconcile runtime owners and command-local diagnostics. (
src/commands/status-overview-values.ts:30, 37e2f26636ee)
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-reviewcomments, 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-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only. - Maintainers can also comment
@clawsweeper reviewto request a fresh review only. - Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge; those execution lanes are retired.
- Maintainers can comment
@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.
Reviewed November 17, 2026, 9:45 PM ET / November 18, 2026, 02:45 UTC.