[BUG] Desktop Code tab renders Settings → Usage (/settings/usage) instead of the session start screen after switching tabs

Status Fixed / completed
Reported on v2.1.247
Maintainer reply None cached
Activity 1 comment · opened Sep 1, 2026 · closed Sep 1, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Switching from the Chat/Cowork tab to the Code tab in Claude Desktop rendered the Settings → Usage page inside the Code pane, instead of the Code session start screen. The Code backend initialized correctly at that same moment — only the rendered view was wrong.

Seen on Claude Desktop 1.40609.0 (Windows 11). It is intermittent: clicking the Code tab again restored the normal start screen, so I don't have a deterministic trigger.

Confirming what actually rendered

Traced through the app's local ion-dist bundle:

  • Component: ion-dist/assets/v1/c71860c77-BgBWVi5D.js — renders the "Token limit" gauge (used/cap, reset time). Its i18n strings describe it as "Token usage on this device across Chat, Cowork, and Code".
  • Its only importers are cf4f70727-c3zAdXrK.js (settings bundle) and shared-16-DFDNRrwQ.js (settings router), where it is registered as /settings/usage, next to /settings/billing, /settings/general, etc.
  • Nothing on the Code home screen path references it.

So the Code pane was displaying the /settings/usage route.

What I ruled out

  • No errors — zero [error] entries in main.log around that time. The only errors that day were unrelated (a python3 version probe; CSP webrtc warnings from artifact iframes).
  • No crash — no Crashpad dumps that day.
  • Not a usage-limit interstitial — plan-usage-history.json sampled 4 minutes earlier: fh:28, sd:12 (28% of the 5-hour window, 12% weekly).
  • Not stale or corrupt local state — config.json, Preferences, git-worktrees.json and cowork-enabled-cli-ops.json are all well-formed and unremarkable, and the bundle has no per-tab route persistence that could go stale.

Suspected cause

Two things in the bundle point at renderer-side routing rather than local state:

  1. frame_mode and the rendered path can diverge. Buffered telemetry in Local Storage shows exactly that combination occurring: frame_mode:"code" while path:"/chat/$uuid". Which tab the sidebar treats as active and which route the frame actually paints are tracked separately and can disagree.
  1. The Usage entry point is gated, and its fallback is a full-frame navigation. In shared-16-DFDNRrwQ.js the user-menu Usage item is wrapped in the claudified_user_menu_usage_nav gate. When settingsModalAvailable is false it falls back to href="/settings/usage", navigating the current frame instead of opening the settings modal (eh("usage")). If that path can fire while the Code frame is mounted, it would replace the Code pane with the usage page — which matches what was observed.

What Should Happen?

Clicking the Code tab should show the Code session start screen (directory picker + prompt box), or resume the previously focused Code session.

Settings → Usage should render only when explicitly opened from Settings — as the settings page/modal — never as the content of the Code pane.

Error Messages/Logs

No errors were logged around the failure - zero [error] entries in main.log at that time.

main.log at the moment of the tab switch (KST) - a completely normal Code bootstrap:

20:38:33 [info] Failed to set title bar overlay, this is probably expected
20:38:35 [info] Config file written
20:38:35 [info] LocalSessions.checkGhAvailable: cwd=<project dir>
20:38:35 [info] [CCD] LocalSessions.setFocusedSession: sessionId=null
20:38:35 [info] [oauth-v2] using cached token for orgId=<redacted> (scopes: ... user:sessions:claude_code)
20:38:35 [info] LocalSessions.checkTrust: cwd=<project dir>
20:38:35 [info] [CCD] /stats (worker) scanned 4/4 transcript files since 2026-03-03

Supporting negative evidence:
- No Crashpad dumps that day.
- plan-usage-history.json sample 4 minutes earlier: {"u":{"fh":28,"sd":12}} - nowhere near a usage limit.
- The page_viewed analytics event for that moment had already been flushed to the server ([EventLogging] Flushing 14 events) about 2 minutes later, so the actually-rendered route is no longer recoverable from Local Storage.

The only errors in main.log that day were unrelated:
18:11:54 [error] Failed to read version of python binary "python3", failed with Error: python3 exited with code 9009
(plus CSP "Unrecognized Content-Security-Policy directive 'webrtc'" warnings from artifact iframes)

Steps to Reproduce

Note: this is intermittent — I hit it once and could not reproduce it on demand. Filing it anyway because the wrongly-rendered view can be identified exactly from the shipped bundle, and the logs show the Code backend was healthy at that moment.

  1. Open Claude Desktop (v1.40609.0, Windows 11), signed in, with a Code project directory already trusted.
  2. Work in the Chat/Cowork tab for a while.
  3. Click the Code tab in the sidebar.

Observed: the Code pane rendered the Settings → Usage token-usage dashboard ("Token limit" gauge) instead of the Code session start screen.

Clicking the Code tab again restored the normal start screen.

The main-process log confirms the Code bootstrap ran normally at that exact moment (checkGhAvailable, checkTrust, oauth token lookup with claude_code scopes, /stats worker) — see the log field above.

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

Claude Desktop 1.40609.0 (MSIX Claude_1.40609.0.0_x64__pzs8sxrjxfjjc); bundled CLI 2.1.247 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Other

Additional Information

Surface: this is the Claude Desktop app's Code tab, not the CLI in a terminal — hence "Other" for Terminal/Shell.

Version note: the desktop app is fully up to date (updaterLastSeenVersion: 1.40609.0, no pending update). The Claude Code CLI version is managed by the app, which pins 2.1.247 at %APPDATA%\Claude\claude-code\2.1.247\claude.exe; npm latest was 2.1.252 at the time of filing. I can't independently upgrade the CLI the app bundles.

Regression: marked "I don't know" — I saw this once and have no data on earlier versions. App upgrade history on this machine: 1.34493.1.0 → 1.37937.1.0 → 1.37937.3.0 → 1.40609.0.0 (first launched 2026-08-29).

Where I looked: %APPDATA%\Claude\ (config.json, Preferences, plan-usage-history.json, Local Storage, Session Storage, Crashpad), %LOCALAPPDATA%\Claude\Logs\ (main.log, claude.ai-web.log), and the shipped renderer bundle at C:\Program Files\WindowsApps\Claude_1.40609.0.0_x64__pzs8sxrjxfjjc\app\resources\ion-dist\.

No screenshot: the screen wasn't captured before navigating away, and the state couldn't be reproduced afterwards. The identification of the view is therefore based on matching the observed UI (token usage gauge titled with the "Token usage on this device across Chat, Cowork, and Code" description) to the only component in the bundle that renders it — the /settings/usage page.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗