Skip to content

[Bug]: Gateway unconditionally probes all 115 manifest providers and external CLI credentials at startup — causing 50s+ blocking even with 1 configured provider #73908

Description

@Ailuras

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

Gateway startup (sidecars.channels / prewarmConfiguredPrimaryModel) blocks ~56s and credential discovery calls security find-generic-password for Claude on macOS, even with only 1 configured provider, 3 plugins, and no Anthropic/Claude credentials anywhere in config or env.

Steps to reproduce

  1. OpenClaw 2026.4.26, macOS, Node 24, config:
    • auth.profiles: only opencode-go:default (api_key)
    • agents.defaults.model.primary: opencode-go/kimi-k2.6
    • plugins.allow: ["opencode-go", "device-pair"] (3 enabled)
    • No fallbacks, no Anthropic/Claude env vars or profiles
  2. openclaw gateway restart
  3. Observe OPENCLAW_GATEWAY_STARTUP_TRACE=1 output showing sidecars.channels ~56.7s, all other stages sub-100ms
  4. Observe log line: [agents/auth-profiles] read anthropic credentials from claude cli keychain — even though no Anthropic/Claude is configured
  5. Run openclaw tui and observe handshake timeout / gateway connect failed correlating with repeated Keychain calls

Expected behavior

  • Startup time proportional to number of configured providers, not full manifest index (115 entries)
  • Credential discovery (readClaudeCliCredentialsCached) should skip providers not in plugins.allow or auth.profiles
  • No calls to security find-generic-password when user never configured Anthropic/Claude

Actual behavior

  • sidecars.channels takes 56.7s (all other sidecar stages <100ms)
  • agents/auth-profiles logs read anthropic credentials from claude cli keychain on every startup/connection
  • macOS Keychain query blocks handshake/connection ~5-10s each call
  • With OPENCLAW_SKIP_MODEL_PREWARM=1 + code guard: startup drops to 2.1s
  • With OPENCLAW_SKIP_CLAUDE_CLI_KEYCHAIN code guard: Keychain calls stop, handshake no longer times out
  • No config-level workaround without code patches

OpenClaw version

OpenClaw 2026.4.26 (be8c246)

Operating system

macOS 26.3.1(25D2128)

Install method

npm gobal

Model

kimi2.6

Provider / routing chain

Single provider, local loopback, no fallbacks: TUI/CLI → ws://127.0.0.1:18789 → opencode-go/kimi-k2.6

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingbug:behaviorIncorrect behavior without a crash

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions