claude-code - 💡(How to fix) Fix Bundled GrowthBook clientKey intermittently returns 400 "Invalid API Key" → all feature flags fail → channels & Remote Control unavailable

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

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…

Claude Code resolves feature flags from GrowthBook using a hardcoded clientKey sdk-zAZezfDKGoZuXXKe (apiHost https://cdn.growthbook.io, same key in 2.1.149 / 2.1.157 / 2.1.158). That key intermittently returns HTTP 400 {"status":400,"error":"Invalid API Key"}. When it does, zero flags load and claude doctor reports "the feature-flag service was unreachable" — so channels (--channels …) and Remote Control silently become unavailable, and a session can't receive pushed/inbound messages.

Error Message

Claude Code resolves feature flags from GrowthBook using a hardcoded clientKey sdk-zAZezfDKGoZuXXKe (apiHost https://cdn.growthbook.io, same key in 2.1.149 / 2.1.157 / 2.1.158). That key intermittently returns HTTP 400 {"status":400,"error":"Invalid API Key"}. When it does, zero flags load and claude doctor reports "the feature-flag service was unreachable" — so channels (--channels …) and Remote Control silently become unavailable, and a session can't receive pushed/inbound messages. {"status":400,"error":"Invalid API Key"} # observed 12/12 consecutive

  • Channels/Remote Control fail closed and silently — no error surfaced to the user; a pushed message is just dropped. A session that happened to cache flags during a valid window keeps working (coasting on stale cache), which makes it look misleadingly like a per-machine/per-version issue.
  1. Consider not hard-failing channels/Remote Control closed on a transient flag-fetch error — degrade more gracefully, and surface the fetch failure clearly (the claude doctor "unreachable" text is good; the channels banner just says "not currently available", which sent us down a long wrong path).

Root Cause

Claude Code resolves feature flags from GrowthBook using a hardcoded clientKey sdk-zAZezfDKGoZuXXKe (apiHost https://cdn.growthbook.io, same key in 2.1.149 / 2.1.157 / 2.1.158). That key intermittently returns HTTP 400 {"status":400,"error":"Invalid API Key"}. When it does, zero flags load and claude doctor reports "the feature-flag service was unreachable" — so channels (--channels …) and Remote Control silently become unavailable, and a session can't receive pushed/inbound messages.

Code Example

$ curl https://cdn.growthbook.io/api/features/sdk-zAZezfDKGoZuXXKe
{"status":400,"error":"Invalid API Key"}     # observed 12/12 consecutive

---

Remote Control
  ✗ tengu_ccr_bridge gate (no server response this session)
  Remote Control eligibility could not be determined — the feature-flag service was unreachable.
  isGrowthBookEnabled=true
  hasFreshGrowthBookFeatures=false
  growthBookFeaturesLoaded=0
  growthBookLastFetched=never

---

--channels ignored (plugin:fakechat@claude-plugins-official)
Channels are not currently available
RAW_BUFFERClick to expand / collapse

Summary

Claude Code resolves feature flags from GrowthBook using a hardcoded clientKey sdk-zAZezfDKGoZuXXKe (apiHost https://cdn.growthbook.io, same key in 2.1.149 / 2.1.157 / 2.1.158). That key intermittently returns HTTP 400 {"status":400,"error":"Invalid API Key"}. When it does, zero flags load and claude doctor reports "the feature-flag service was unreachable" — so channels (--channels …) and Remote Control silently become unavailable, and a session can't receive pushed/inbound messages.

Environment

  • Claude Code 2.1.149 / 2.1.157 / 2.1.158 (verified identical clientKey in all three via strings)
  • Linux (x64) and macOS (arm64)
  • First-party claude.ai subscription auth (Team), apiProvider: firstParty

Repro (machine-independent, no auth required)

$ curl https://cdn.growthbook.io/api/features/sdk-zAZezfDKGoZuXXKe
{"status":400,"error":"Invalid API Key"}     # observed 12/12 consecutive

It flaps: minutes before the above, a claude process fetched 278 flags successfully off the same key (claude doctor showed growthBookFeaturesLoaded=278, growthBookLastFetched=5s ago). So the key oscillates valid↔invalid at the CDN — consistent with a key rotation / project-config change that left deployed CLIs pointing at a key the CDN now rejects intermittently.

claude doctor on a failing session

Remote Control
  ✗ tengu_ccr_bridge gate (no server response this session)
  Remote Control eligibility could not be determined — the feature-flag service was unreachable.
  isGrowthBookEnabled=true
  hasFreshGrowthBookFeatures=false
  growthBookFeaturesLoaded=0
  growthBookLastFetched=never

vs a working session on the same version/key: growthBookFeaturesLoaded=278.

Banner on the failing session:

--channels ignored (plugin:fakechat@claude-plugins-official)
Channels are not currently available

Impact

  • The CDN response is global per clientKey, so while the key is in its invalid state it affects all Claude Code instances simultaneously (we saw a fleet-wide break → partial recovery).
  • Channels/Remote Control fail closed and silently — no error surfaced to the user; a pushed message is just dropped. A session that happened to cache flags during a valid window keeps working (coasting on stale cache), which makes it look misleadingly like a per-machine/per-version issue.

Ask

  1. Restore/rotate the GrowthBook clientKey so cdn.growthbook.io accepts it (and/or ship a build with a valid key).
  2. Consider not hard-failing channels/Remote Control closed on a transient flag-fetch error — degrade more gracefully, and surface the fetch failure clearly (the claude doctor "unreachable" text is good; the channels banner just says "not currently available", which sent us down a long wrong path).

🤖 Generated with Claude Code

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

claude-code - 💡(How to fix) Fix Bundled GrowthBook clientKey intermittently returns 400 "Invalid API Key" → all feature flags fail → channels & Remote Control unavailable