[BUG] Sessions list view crashes with TypeError in getAuthStatus when stored auth state is malformed
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?
The Claude Code sidebar fails to render with "An error occurred while loading view: claudeVSCodeSessionsList".
Developer Tools console shows the view crashing inside getAuthStatus while building the webview HTML:
TypeError: Cannot read properties of undefined (reading 'includes')
at Rd.getAuthStatus (extension.js)
at kG.getHtmlForWebview (extension.js)
at kG.resolveSessionListView (extension.js)
at Object.resolveWebviewView (extension.js)
getAuthStatus appears to call .includes() on a field that is undefined in the stored credentials, and the exception propagates up through getHtmlForWebview, so the entire view fails to render instead of degrading to a "please log in" state.
The extension itself activates normally — the IDE lock file is created and CLAUDE_CODE_SSE_PORT is set. Only this view is affected; the secondary chat panel keeps working.
Resolution on my side: clearing the stored credentials (Keychain entry + auth keys in ~/.claude.json) and logging in again fixed it immediately.
What Should Happen?
When stored auth state is missing or malformed, the sessions list view should render a sign-in prompt rather than throwing. A null guard in getAuthStatus would prevent the whole webview from failing.
Error Messages/Logs
1. Have a malformed/partial credential record in stored auth state
2. Open VS Code and click the Claude Code sidebar icon
3. The view fails with "An error occurred while loading view: claudeVSCodeSessionsList"
4. Developer Tools console shows the TypeError above
Steps to Reproduce
I dont know
Claude Model
Other
Is this a regression?
I don't know
Last Working Version
N/A
Claude Code Version
2.1.280 (also reproduced on 2.1.220)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
- Reproduced identically on 2.1.280 and 2.1.220 (darwin-arm64), so not a version regression
- Also reproduced in Cursor, since both editors read the same credential store
- Not related to session history: the error persisted with ~/.claude/projects moved aside, and in freshly created projects
- Downgrading, clearing globalStorage, and removing IDE lock files had no effect
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗