Skip to content

[Bug]: SecretRef-backed Google Chat auth reports unhealthy in some CLI commands while gateway status succeeds (2026.6.5) #91815

Closed

Description

@mattsfraser

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

CLI commands including openclaw browser doctor, openclaw gateway health, and openclaw channels status fail with GatewaySecretRefUnavailableError when gateway.auth.password is configured via SecretRef, while openclaw gateway status --deep reports the gateway as healthy and reachable.

Steps to reproduce

  1. Configure OpenClaw with gateway.auth.password stored as a SecretRef.
  2. Start the gateway and verify it is running:
    openclaw gateway status --deep
  3. Run:
    openclaw gateway health
  4. Observe:
    GatewaySecretRefUnavailableError
  5. Run:
    openclaw browser doctor
    or
    openclaw channels status
  6. Observe the same GatewaySecretRefUnavailableError.
  7. Run:
    openclaw gateway status --deep
  8. Observe that the gateway reports:
    • Runtime: running
    • Connectivity probe: ok
    • Capability: admin-capable

Expected behavior

Commands that communicate with a healthy local gateway should resolve SecretRef-backed gateway credentials the same way as openclaw gateway status --deep and should not fail with GatewaySecretRefUnavailableError.

Actual behavior

openclaw gateway health, openclaw browser doctor, and openclaw channels status fail with:

GatewaySecretRefUnavailableError: gateway.auth.password is configured as a secret reference but is unavailable in this command path.

At the same time, openclaw gateway status --deep reports:

  • Runtime: running
  • Connectivity probe: ok
  • Capability: admin-capable

The issue was observed with gateway.auth.password configured as a SecretRef.

OpenClaw version

2026.6.5

Operating system

Linux Mint 22.3 (based on Ubuntu 24.04 LTS)

Install method

npm global install

Model

google/gemini-3.1-pro-preview

Provider / routing chain

OpenRouter -> Google Gemini

Additional provider/model setup details

Issue reproduces before any model inference occurs. The problem appears related to SecretRef-backed gateway authentication resolution in CLI commands.

Logs, screenshots, and evidence

openclaw gateway health

GatewaySecretRefUnavailableError: gateway.auth.password is configured as a secret reference but is unavailable in this command path.
Fix: set OPENCLAW_GATEWAY_TOKEN/OPENCLAW_GATEWAY_PASSWORD, pass explicit --token/--password,
or run a gateway command path that resolves secret references before credential selection.

openclaw channels status

Gateway not reachable: gateway.auth.password is configured as a secret reference but is unavailable in this command path.

openclaw browser doctor

FAIL gateway: GatewaySecretRefUnavailableError: gateway.auth.password is configured as a secret reference but is unavailable in this command path.

<img width="1920" height="1080" alt="Image" src="https://github.com/user-attachments/assets/d6e99f27-588f-4619-a677-83e50abb624d" />
<img width="1920" height="1080" alt="Image" src="https://github.com/user-attachments/assets/86768883-fb61-4290-8c84-bbe3b36a6eb3" />
<img width="1920" height="1080" alt="Image" src="https://github.com/user-attachments/assets/f6e4d396-65e4-4270-982b-d94d5be9e95a" />

Impact and severity

Operators using SecretRef-backed gateway authentication may be unable to use gateway-dependent CLI commands even when the gateway is healthy and reachable. The issue affects diagnostics and browser/channel tooling and can make a healthy installation appear broken.

Additional information

The gateway password is configured as a SecretRef and intentionally not stored in plaintext. This installation uses Bitwarden Secrets Manager. The gateway starts successfully, reports healthy status via openclaw gateway status --deep, and Google Chat functions correctly, but several CLI commands fail with GatewaySecretRefUnavailableError.

Activity

  1. clawsweeper commented on Jun 10, 2026

    @clawsweeper
    Contributor

    Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 11, 2026, 6:18 PM ET / 22:18 UTC.

    Summary
    Codex review failed: retryable codex transport failure (exit 1).

    Reproducibility: unclear. The review failed before ClawSweeper could establish a reproduction path.

    Ways to help us reproduce this

    • Add a screenshot or short recording showing the behavior.
    • Include the exact command, prompt, or workflow that triggered it.
    • Add expected vs actual behavior.

    Next step
    Review did not complete, so no work-lane recommendation was made.

    Review details

    Best possible solution:

    Retry the Codex review after fixing the execution failure.

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

    Unclear. The review failed before ClawSweeper could establish a reproduction path.

    Is this the best way to solve the issue?

    Unclear. Retry the review first so ClawSweeper can evaluate the actual issue and fix direction.

    AGENTS.md: unclear because the file could not be read completely.

    Remaining risk / open question:

    • No close action taken because the review did not complete.

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

    Label changes

    Label changes:

    • add issue-rating: 🦪 silver shellfish: Current issue advisory state selects this label.
    • add clawsweeper:needs-info: Current issue advisory state selects this label.
    • remove P2: Current review triage priority is none.
    • remove clawsweeper:no-new-fix-pr: Current issue advisory state no longer selects this label.
    • remove clawsweeper:needs-maintainer-review: Current issue advisory state no longer selects this label.
    • remove clawsweeper:needs-live-repro: Current issue advisory state no longer selects this label.
    • remove impact:security: Current review selected no impact labels.
    • remove impact:auth-provider: Current review selected no impact labels.
    • remove issue-rating: 🐚 platinum hermit: Current issue advisory state no longer selects this label.
    Evidence reviewed

    What I checked:

    • failure reason: retryable codex transport failure.
    • codex failure detail: Codex review failed for this issue with exit 1.
    • codex stderr: {.

    Likely related people:

    • unknown: Codex failed before it could trace repository history. (role: review did not complete; confidence: low)
    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.
  2. added
    P2Normal backlog priority with limited blast radius.
    impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.
    impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.
    issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.
    clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.
    clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.
    clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.
    on Jun 10, 2026
  3. harjothkhara commented on Jun 10, 2026

    @harjothkhara
    Contributor

    Root cause + scope mapping for #91815

    Traced this on main@bf89552e67. The split is in how each command handles an unresolvable gateway.auth.password SecretRef:

    • openclaw gateway status --deep tolerates it because the probe path uses the Safe resolver resolveGatewayProbeAuthSafeWithSecretInputs (src/gateway/probe-auth.ts), which catches GatewaySecretRefUnavailableError, warns "SecretRef is unresolved in this command path; probing without configured auth credentials," and degrades to an unauthenticated probe.
    • openclaw gateway health, openclaw channels status, and openclaw browser doctor all reach the gateway via the strict callGateway → resolveGatewayCredentialsWithSecretInputs (src/gateway/call.ts), which propagates GatewaySecretRefUnavailableError and hard-fails. Call sites: src/cli/daemon-cli/probe.ts (health RPC), src/commands/channels/status.ts:243, and extensions/browser → callGatewayFromCli (plugin SDK) for browser doctor.

    This looks like the same class addressed for doctor in 00067563a6 (fix(doctor): handle gateway SecretRefs in auth checks) — i.e. don't hard-fail on an unavailable gateway SecretRef; report a read-only warning and continue, with exec-backed refs gated behind an explicit --allow-exec. That commit covered the doctor --lint health surface but not these three read-only status commands.

    Before proposing a patch, I'd like to confirm the intended contract for these three commands when gateway.auth.password is a SecretRef that can't be resolved in the command's context:

    • (A) Mirror status --deep — emit the same "unresolved in this command path" warning and run the degraded/unauthenticated path (smallest change: route them through resolveGatewayProbeAuthSafe* / catch-and-warn around callGateway).
    • (B) Surface a clean, actionable error (set OPENCLAW_GATEWAY_PASSWORD / --password) instead of a raw GatewaySecretRefUnavailableError.
    • (C) Actually resolve via the gateway's already-materialized credentials over the existing authenticated local channel, so these commands fully succeed.

    And: should exec-backed refs here require the same --allow-exec opt-in introduced in 00067563a6?

    Happy to send a PR once the desired behavior is confirmed. (Note: a faithful real-behavior proof for exec-backed refs needs live secret-provider infra; I can cover file/env-backed SecretRefs locally.)

  4. mattsfraser commented on Jun 10, 2026

    @mattsfraser
    Author

    Additional context: this appears to be a regression after updating to OpenClaw 2026.6.5.

    Before the update, this installation was operating with gateway.auth.password configured as a SecretRef backed by Bitwarden Secrets Manager. After updating to 2026.6.5, the gateway itself still starts successfully and openclaw gateway status --deep reports the gateway as running, reachable, and admin-capable, but several gateway-dependent CLI commands now fail with GatewaySecretRefUnavailableError.

    The important point is that this setup is intentionally not using a plaintext gateway password in ordinary config. The gateway credential is meant to remain SecretRef-backed. So from an operator perspective, the failure is not that the gateway is down; it is that some CLI command paths appear unable to resolve or tolerate the SecretRef-backed gateway credential after the update.

    The affected commands observed so far include:

    openclaw gateway health
    openclaw channels status
    openclaw browser doctor
    openclaw doctor --allow-exec

    The working/contrasting command is:

    openclaw gateway status --deep

    That command continues to report the gateway as healthy/reachable/admin-capable.

    So I think the core issue is correctly described as a command-path inconsistency/regression around SecretRef-backed gateway.auth.password handling in 2026.6.5.

    I am not requesting a workaround that stores the gateway password in plaintext or bypasses Bitwarden Secrets Manager. The desired behavior is that SecretRef-backed gateway auth remains supported, and that read-only diagnostic/status commands either:

    1. resolve the SecretRef correctly,
    2. degrade safely like gateway status --deep, or
    3. return a clean actionable warning rather than hard-failing with GatewaySecretRefUnavailableError.

    Happy to provide more terminal output if helpful.

  5. self-assigned this
    on Jun 11, 2026
  6. joshavant commented on Jun 12, 2026

    @joshavant
    Collaborator

    Thanks for the clear report and follow-up context, @mattsfraser.

    This was fixed by #92290. The issue was the split you described: the Gateway process could start with the SecretRef-backed gateway.auth.password, and openclaw gateway status --deep used the safe probe path, but several diagnostic/read-only commands still went through strict client-side Gateway credential resolution and surfaced GatewaySecretRefUnavailableError.

    The fix keeps strict Gateway RPC calls fail-closed, but updates the diagnostic paths to handle this state cleanly:

    • openclaw health / openclaw gateway health now report the Gateway as reachable but requiring credentials.
    • openclaw channels status now falls back to config-only output with an auth-unavailable message instead of saying the Gateway is unreachable.
    • openclaw browser doctor now shows a readable SecretRef auth diagnostic.
    • openclaw doctor --allow-exec now treats the reachable Gateway as healthy-but-unauthenticated instead of reporting a raw health failure.

    We verified this against a real Gateway setup with the env SecretRef visible only to the Gateway process, matching the command-path inconsistency from the report.

  7. locked as resolved and limited conversation to collaborators on Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2Normal backlog priority with limited blast radius.bugSomething isn't workingbug:behaviorIncorrect behavior without a crashclawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions