openclaw - ✅(Solved) Fix openclaw auth list hangs indefinitely with no output [1 pull requests, 2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#73305Fetched 2026-04-29 06:21:12
View on GitHub
Comments
2
Participants
3
Timeline
3
Reactions
0
Author
Timeline (top)
commented ×2cross-referenced ×1

The openclaw auth list subcommand hangs indefinitely and never produces output, regardless of TTY/non-TTY context, --help, or --json flags. This makes it impossible to inspect configured auth profiles via the CLI.

Root Cause

Notes / Hypotheses

  • Looks like the subcommand may be waiting for stdin (interactive TUI prompt) that never resolves, or a TUI render loop that does not flush in non-interactive environments.
  • The --help flag also being affected suggests the Yargs/Commander-style help short-circuit may be missing for this subcommand, or the TUI bootstrap runs before help parsing.
  • The non-TTY exit-0-but-silent path is particularly bad because it makes the failure invisible to scripts/automation.

Fix Action

Workaround

Read the JSON file directly:

cat ~/.openclaw/agents/main/agent/auth-profiles.json

Other CLI subcommands work normally (gateway status, doctor, --version, help).

PR fix notes

PR #73462: fix: add auth profile listing

Description (problem / solution / changelog)

Summary

  • Problem: openclaw auth list is currently unavailable for users trying to inspect saved model auth profiles.
  • Why it matters: scripts and troubleshooting flows need a read-only way to confirm configured auth profile ids without reading auth-profiles.json directly.
  • What changed: added openclaw auth list plus openclaw models auth list, with text, JSON, and plain output that does not print raw API keys, tokens, or OAuth access tokens.
  • What did NOT change (scope boundary): no auth creation, refresh, login, secret resolution, or provider probing behaviour changed.

Fixes #73305.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

  • Closes #73305
  • Related #
  • This PR fixes a bug or regression

Root Cause (if applicable)

  • Root cause: the model auth CLI had login/setup/order helpers but no read-only list subcommand, and there was no top-level auth command registered.
  • Missing detection / guardrail: command-registration tests did not cover the expected auth list affordance.
  • Contributing context (if known): users had to read the auth store JSON directly to inspect saved profiles.

Regression Test Plan (if applicable)

  • Coverage level that should have caught this:
    • Unit test
    • Seam / integration test
    • End-to-end test
    • Existing coverage already sufficient
  • Target test or file: src/cli/auth-cli.test.ts, src/cli/models-cli.test.ts, src/commands/models/auth-list.test.ts
  • Scenario the test should lock in: both CLI surfaces route to the same read-only list command, and formatted output does not include stored secret values.
  • Why this is the smallest reliable guardrail: the bug is command wiring plus output sanitisation, so command-level and formatter unit tests cover the regression without provider/network setup.
  • Existing test that already covers this (if any): none.
  • If no new test is added, why not: N/A.

User-visible / Behavior Changes

openclaw auth list and openclaw models auth list now print configured model auth profile metadata. --json emits structured metadata and --plain emits profile ids only.

Diagram (if applicable)

N/A

Before:
openclaw auth list -> unknown command

After:
openclaw auth list -> read auth profile store -> redacted profile summary

Security Impact (required)

  • New permissions/capabilities? (Yes/No) No
  • Secrets/tokens handling changed? (Yes/No) No
  • New/changed network calls? (Yes/No) No
  • Command/tool execution surface changed? (Yes/No) Yes
  • Data access scope changed? (Yes/No) No
  • If any Yes, explain risk + mitigation: this adds a read-only CLI command for existing local auth profile metadata. Output intentionally reports credential kind/status only and tests assert raw API keys and OAuth token values are not printed.

Repro + Verification

Environment

  • OS: macOS
  • Runtime/container: local checkout
  • Model/provider: N/A
  • Integration/channel (if any): N/A
  • Relevant config (redacted): N/A

Steps

  1. Run openclaw auth list.
  2. Run openclaw models auth list --json.

Expected

  • Commands print auth profile metadata without raw secret values.

Actual

  • Current release reports auth as unavailable or leaves users without a read-only profile-listing command.

Evidence

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)

Local command evidence:

  • git diff --check HEAD~1..HEAD passed.
  • pnpm install was attempted twice but blocked before tests by Corepack registry timeouts while downloading pnpm 10.33.0 (UND_ERR_CONNECT_TIMEOUT).

Human Verification (required)

  • Verified scenarios: source-level command wiring for auth list and models auth list; formatter tests cover redaction of API key, token, and OAuth values.
  • Edge cases checked: missing credential marker, OAuth expiry display, cooldown status precedence.
  • What you did not verify: local Vitest/typecheck/format, because this machine could not download pnpm through Corepack. CI should run the new test files.

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

Compatibility / Migration

  • Backward compatible? (Yes/No) Yes
  • Config/env changes? (Yes/No) No
  • Migration needed? (Yes/No) No
  • If yes, exact upgrade steps: N/A

Risks and Mitigations

  • Risk: auth metadata output could accidentally reveal secret material.
    • Mitigation: the formatter reports only credential kind and status, and unit coverage asserts raw key/token values are absent.

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • docs/cli/index.md (modified, +5/-3)
  • docs/cli/models.md (modified, +6/-1)
  • src/cli/auth-cli.test.ts (added, +43/-0)
  • src/cli/auth-cli.ts (added, +39/-0)
  • src/cli/command-catalog.ts (modified, +4/-0)
  • src/cli/models-cli.test.ts (modified, +13/-0)
  • src/cli/models-cli.ts (modified, +22/-0)
  • src/cli/program/register.subclis-core.ts (modified, +5/-0)
  • src/cli/program/subcli-descriptors.ts (modified, +5/-0)
  • src/commands/models.ts (modified, +1/-0)
  • src/commands/models/auth-list.test.ts (added, +101/-0)
  • src/commands/models/auth-list.ts (added, +180/-0)

Code Example

openclaw auth list
openclaw auth list --json
openclaw auth list --help
openclaw auth          # the bare subcommand
openclaw auth list </dev/null    # non-TTY

---

Config warnings:
- plugins: plugin: ignored plugins.load.paths entry that points at OpenClaw's current bundled plugin directory; remove this redundant path or run openclaw doctor --fix
[hangs here forever]

---

$ openclaw auth list </dev/null; echo "EXIT=$?"
EXIT=0

---

cat ~/.openclaw/agents/main/agent/auth-profiles.json
RAW_BUFFERClick to expand / collapse

openclaw auth list hangs indefinitely with no output

Summary

The openclaw auth list subcommand hangs indefinitely and never produces output, regardless of TTY/non-TTY context, --help, or --json flags. This makes it impossible to inspect configured auth profiles via the CLI.

Environment

  • OpenClaw version: 2026.4.25
  • OS: Linux 6.17.0-22-generic (x64), Docker container (host: e93173f4b2b5)
  • Node: v24.14.0
  • Shell: /bin/sh (Debian-based)
  • systemd user services: unavailable (running gateway in foreground)

Reproduction Steps

  1. Have at least one configured auth profile in ~/.openclaw/agents/main/agent/auth-profiles.json (e.g. anthropic + openai api keys configured via the wizard).
  2. Run any of the following:
openclaw auth list
openclaw auth list --json
openclaw auth list --help
openclaw auth          # the bare subcommand
openclaw auth list </dev/null    # non-TTY

Expected Behavior

A list of configured auth profiles is printed (similar to gateway status), or at minimum --help returns usage text.

Actual Behavior

  • With TTY: Prints only "Config warnings" header (if any) then hangs forever; manual kill required. Exit code 124 under timeout.
  • Without TTY (</dev/null): Exits cleanly with code 0 but produces no output at all — silent success.
  • --help: Same behavior as the bare command — hangs or silent.
  • --json: Same — silent or hung.

Sample output (with PTY, killed after 10s)

Config warnings:
- plugins: plugin: ignored plugins.load.paths entry that points at OpenClaw's current bundled plugin directory; remove this redundant path or run openclaw doctor --fix
[hangs here forever]

Sample output (non-TTY, exit 0)

$ openclaw auth list </dev/null; echo "EXIT=$?"
EXIT=0

(zero stdout / stderr beyond the exit)

Workaround

Read the JSON file directly:

cat ~/.openclaw/agents/main/agent/auth-profiles.json

Other CLI subcommands work normally (gateway status, doctor, --version, help).

Notes / Hypotheses

  • Looks like the subcommand may be waiting for stdin (interactive TUI prompt) that never resolves, or a TUI render loop that does not flush in non-interactive environments.
  • The --help flag also being affected suggests the Yargs/Commander-style help short-circuit may be missing for this subcommand, or the TUI bootstrap runs before help parsing.
  • The non-TTY exit-0-but-silent path is particularly bad because it makes the failure invisible to scripts/automation.

Severity

Medium — does not block usage (workaround exists), but makes auth inspection impossible from CLI and breaks any tooling/automation that scrapes openclaw auth list. Also confusing for users following docs.

Related

  • Found while checking Anthropic auth profile configuration.
  • Filed via OpenClaw assistant (Claw) on behalf of user.

extent analysis

TL;DR

The openclaw auth list subcommand can be worked around by reading the auth profiles JSON file directly.

Guidance

  • Verify that the ~/.openclaw/agents/main/agent/auth-profiles.json file exists and contains the expected auth profiles.
  • Try running the command with the --json flag to see if it produces any output.
  • Use the workaround cat ~/.openclaw/agents/main/agent/auth-profiles.json to inspect the auth profiles.
  • Check if other CLI subcommands, such as gateway status or doctor, work as expected to isolate the issue.

Example

cat ~/.openclaw/agents/main/agent/auth-profiles.json

This command will print the contents of the auth profiles JSON file, allowing you to inspect the configured auth profiles.

Notes

The issue seems to be related to the openclaw auth list subcommand hanging indefinitely, possibly due to a TUI render loop issue or missing help parsing. The workaround provides a temporary solution, but the root cause should be investigated and fixed.

Recommendation

Apply the workaround by reading the auth profiles JSON file directly, as it provides a reliable way to inspect the configured auth profiles.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING