Skip to content

VS Code 26.917.62051: missing authenticatedUserId causes SSE usage data to be discarded (Rate limit: Unavailable) #48010

Open

Description

@Zhirong641

What version of the IDE extension are you using?

openai.chatgpt-26.917.62051-win32-x64

What subscription do you have?

ChatGPT Pro 20x, using ChatGPT account sign-in.

Which IDE are you using?

Visual Studio Code.

What platform is your computer?

Windows x64; reported OS version 10.0.26200.0.

What issue are you seeing?

The Work locally dropdown does not show Usage remaining, and the extension's Status panel shows Rate limit: Unavailable. Context usage is still displayed normally.

The web usage dashboard works for the affected account. Reloading the VS Code window and signing out/in did not resolve it. Switching to other accounts in the same extension installation shows usage normally.

Runtime diagnostics and inspection of the installed extension identify a mismatch between the extension-host account-info response and the webview's authenticated user identity. The affected account uses the SSE usage transport. Its usage HTTP request succeeds, but the webview rejects the response because its expected authenticated user ID is null.

What steps can reproduce the bug?

  1. Use the extension version above on Windows and sign in with an account for which the usage transport is sse.
  2. Open a local conversation and expand Work locally.
  3. Open the Status panel.
  4. Observe that usage is missing from the dropdown and Status reports Rate limit: Unavailable, despite the web usage dashboard showing data.
  5. Reload the window or sign in again: the symptom persists.

The transport setting is account-dependent; this report does not assume every Pro account is assigned SSE.

What is the expected behavior?

Valid usage data for the signed-in user should populate the remaining-usage UI. The extension host and webview should agree on the authenticated identity fields, including when SSE usage updates are enabled.

Additional information

Runtime evidence

Temporary diagnostic logging was added only to record response status, field-presence booleans, identity-match booleans, and rate-window metadata. Three consecutive requests on September 25, 2026 produced this pattern:

HTTP:
  httpStatus=200
  accountMatchesRequest=true
  hasAccountId=true
  hasUserId=true
  planType=pro
  primaryPresent=true
  primaryWindowSeconds=604800

Webview usage query:
  transport=sse
  nullResponse=false
  accountMatches=true
  expectedAccountPresent=true
  expectedUserPresent=false
  userMatches=false
  primaryPresent=true
  primaryWindowSeconds=604800

The bundled app server's account/rateLimits/read also returned valid rate-limit data. This is not an empty server-side allowance response.

Field mismatch in the installed extension

  • In out/extension.js, the successful account-info handler returns accountId, userId, plan, email, computeResidency, and hasChatGptToken. It does not return authenticatedUserId. Its existing userId comes from the authenticated token's chatgpt_user_id.
  • In webview/assets/app-initial-e47a6bae212d.js, kEi selects accountInfo.authenticatedUserId ?? null when the account IDs match and stores that as the webview's authenticated user identity.
  • In webview/assets/app-initial-de4359f78ed1.js, the usage-query logic checks the response's user_id against that identity when the transport is sse. A mismatch cancels the query and throws a silent cancellation.
  • Here, the response contains a valid user ID but the expected ID is null, so the successful response is discarded. The usage-window display consequently has no usable data.

Simplified equivalent of the relevant logic:

// Extension host: authenticatedUserId is absent.
const accountInfo = { accountId, userId /* other fields */ };

// Webview identity selection:
const expectedUserId =
  accountInfo.accountId === authenticatedAccountId
    ? accountInfo.authenticatedUserId ?? null
    : null;

// Usage query, after HTTP 200:
if (
  transport === "sse" &&
  response != null &&
  response.user_id !== expectedUserId
) {
  // Cancel the query with a silent cancellation.
}

Controlled reproduction

The account-info return expression, frontend identity-selection expression, and usage rejection condition were extracted from the installed JavaScript and evaluated locally with synthetic identities:

Case Response rejected by the identity condition?
Existing account-info fields + SSE Yes
Existing account-info fields + polling No
Same response with authenticatedUserId populated from the existing authenticated userId + SSE No

The affected account's SSE selection was observed directly. Other accounts were not each instrumented, so polling is a code-supported explanation for the account-dependent behavior, rather than a claim about every working account.

Suggested fix direction

Populate authenticatedUserId in the extension host's account-info contract using the same authenticated source as its existing userId, or otherwise align the producer and consumer contracts while preserving identity checks. Add coverage for the VS Code bridge with SSE usage enabled.

This proposed field completion passed the local expression-level comparison; it has not been applied and verified as an end-to-end UI fix.

Temporary diagnostic modifications were removed after investigation, and restored files were checked against their original hashes. No account IDs, user IDs, email addresses, credentials, private filesystem paths, or full session transcripts are included in this report.

Activity

  1. added
    bug
    extension
    auth
    rate-limits
    on Sep 25, 2026
  2. chesha1 commented on Sep 25, 2026

    @chesha1

    I can also reproduce this with Codex extension 26.917.62051 in VS Code on Windows, using a WSL Debian workspace. Usage information is missing from both the “Work locally” dropdown and Settings → Usage. Codex CLI 0.154.0 in the same WSL environment, signed in to the same account, displays usage correctly with /status. The extension Console shows no usage-related errors. Expected: the extension should display the same account usage information available in the CLI.

  3. MazenSenih commented on Sep 25, 2026

    @MazenSenih

    I have the same issue

  4. Abalsells-SILAE commented on Sep 26, 2026

    @Abalsells-SILAE

    I reported the same visible regression in #47578 (Codex VS Code extension 26.917.61114): the "Work locally" menu still opens, but the "Usage remaining" entry that used to appear below its separator is absent. #47734 includes a screenshot of the missing usage indicators in a later extension build.

    #47578 was closed as a duplicate of #47486. The latter describes the Settings > Usage entry disappearing specifically for a ChatGPT Business workspace; my report concerns the "Work locally" menu. I have not verified whether my account uses SSE or whether the authenticatedUserId mismatch diagnosed here is the cause in my case.

    Could an OpenAI maintainer please confirm whether the missing "Usage remaining" menu entry is being investigated, identify the tracking issue for this regression, and say whether restoring it is planned? A separate always-visible usage indicator would also be useful, but the immediate regression is the missing existing menu entry.

  5. mystox commented on Sep 28, 2026

    @mystox

    I was able to verify the proposed fix end-to-end in the affected VS Code extension.

    The important point is that this is a field/contract mismatch inside the current extension bundle; the observation by itself does not establish that an update left files out of sync.

    What I verified:

    • The extension-host/backend account-info response provides userId.
    • The usage UI reads authenticatedUserId.
    • Because authenticatedUserId is absent, the webview has no authenticated user identity for the SSE usage response.
    • The usage request itself succeeds, but the identity check prevents the returned usage data from being accepted/displayed.

    I patched the returned account-info object so that authenticatedUserId is populated from the same authenticated identity already exposed as userId (i.e. aligning the producer/consumer contract rather than removing the identity check).

    Simplified:

    // before
    return {
      accountId,
      userId,
      // ...
    };
    
    // verified locally
    return {
      accountId,
      userId,
      authenticatedUserId: userId,
      // ...
    };

    After adding the missing field and reloading the extension:

    • Settings → Usage successfully displayed the quota/usage windows.
    • The main extension UI / Work locally usage display also showed the remaining usage.
    • The query no longer remained stuck waiting for usage data.

    So the suggested fix direction in the issue is now locally verified as an actual end-to-end UI fix for this affected installation.

    A durable upstream fix should align the account-info contract between the extension host and webview (whether by returning authenticatedUserId, or by changing the consumer to use the canonical existing field), while preserving the user/account identity validation. A regression test covering the VS Code bridge + SSE usage path would also prevent this from recurring.

  6. victor-bi commented on Nov 2, 2026

    @victor-bi

    Bring it back please. Same issue here

  7. 0tii commented on Nov 2, 2026

    @0tii

    Not having the quota available at a close glance is such a stupid move, I have to go through the Codex Settings into Usage & Billing every time I want to check my quota.

    Please dont tell me this is an obfuscation tactic to have users more easily run out of quota and buy resets or something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    authbugextensionrate-limits

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions