{"version":"2.1.227","anchor":"feature-flag-client-refreshes-the-oauth-token-before-it-star","canonical_anchor":"feature-flag-client-refreshes-the-oauth-token-before-it-star","heading":"Feature-flag client refreshes the OAuth token before it starts","tier":"internal","area":"Startup","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.227\/e\/feature-flag-client-refreshes-the-oauth-token-before-it-star","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.227","markdown":"### Feature-flag client refreshes the OAuth token before it starts\n\nStartup refreshes your token first so feature flags don't load with stale credentials.\n\n**What**\n\nAt startup, Claude Code now attempts an OAuth token refresh, bounded by a 5 second timeout, before creating the feature-flag client and resolving its auth headers. Previously a stale token could produce an unauthenticated flag fetch at startup. Failures are logged at debug level (recording 'timeout' or the error name) and startup continues either way.\n\n**Details**\n\n- Runs only once workspace trust is established.\n\n**Evidence**\n\n`GrowthBook pre-init OAuth refresh`\n\n- Area: Startup\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 2\/5"}