[BUG] # Webview fails to load content - "Crunching..." state persists
Resolved 💬 3 comments Opened Jan 11, 2026 by brezzashen Closed Jan 15, 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?
Webview fails to load content - "Crunching..." state persists
Environment
- OS: macOS 25.2.0 (Darwin 25.2.0)
- Architecture: darwin-arm64 (Apple Silicon)
- Extension Version: 2.1.5
- Extension ID: Anthropic.claude-code
- Extension Path:
/Users/brezza/.cursor/extensions/anthropic.claude-code-2.1.5-darwin-arm64
What Should Happen?
Problem Description
The VS Code extension webview (right panel) fails to load content and remains stuck in "Crunching..." state. The terminal CLI mode (left side) works perfectly and receives correct responses. When closing and reopening the panel, content can be briefly seen but then gets stuck again.
Key observation: API requests are successful (confirmed by checking session files), but the webview cannot render the content.
Error Messages/Logs
## Error Logs
### Primary Error - Client Not Ready
[Extension Host] callClient: client not ready
error @ workbench.desktop.main.js:55
[Extension Host] callClient: client not ready
XTf @ workbench.desktop.main.js:12674
**Repeats multiple times**
### Service Worker Controller Mismatch
Found unexpected service worker controller.
Found: vscode-webview://1kkr8v5sci0bqdn3dcvmdi3hnohm1chk2issipe8h73dgsrtr33r/service-worker.js?v=4&...
Expected: service-worker.js?v=4&vscode-resource-base-authority=vscode-resource.vscode-cdn.net&id=f0ea8d17-8339-4f92-98d7-2c288416bd76&...
Waiting for controllerchange.
### Initial Error - Directory Scan (Resolved)
[Anthropic.claude-code]ENOENT: no such file or directory, scandir '/Users/brezza/.claude/projects/-Users-brezza--cursor-extensions-anthropic-claude-code-2-1-5-darwin-arm64'
**Status**: Directory exists, likely a race condition
### Telemetry Errors (Non-critical)
Error: 1P event logging: 27 events failed to export
[otel.error] OTLPExporterError: Bad Request
Steps to Reproduce
## Reproduction Steps
1. Open Cursor IDE
2. Open Claude Code extension (right panel or new tab)
3. Send a message (e.g., "网络测试")
4. **Observe**: Left terminal CLI receives correct response ✅
5. **Observe**: Right webview shows "Crunching..." and never loads ❌
6. Close and reopen panel: Content briefly visible, then stuck again
## Attempted Solutions (All Failed)
### ✅ Checked directory permissions
- Directory exists with correct permissions (700)
- **Result**: Not a permission issue
### ❌ Reload Window
- `Cmd + Shift + P` → `Developer: Reload Window`
- **Result**: Problem persists
### ❌ Close and reopen panel
- Close tab, then `Claude Code: Open in New Tab`
- **Result**: Brief content flash, then stuck again
### ✅ Checked extension logs
- `Claude Code: Show Logs`
- **Result**: API requests successful, webview cannot display
### ✅ Verified session files
- Checked `~/.claude/projects/.../*.jsonl` files
- **Result**: API responses successfully saved with complete content
- **Conclusion**: Data exists, webview rendering fails
### ❌ Clear Service Worker cache
- DevTools (`Cmd + Option + I`) → Application → Service Workers → Unregister all
- Application → Storage → Clear site data
- Reload window
- **Result**: Problem persists
### ❌ Clear Cursor application cache
- Deleted `~/Library/Application Support/Cursor/Cache/*`
- Deleted `~/Library/Application Support/Cursor/Code Cache/*`
- Deleted `~/Library/Application Support/Cursor/GPUCache/*`
- Full Cursor restart
- **Result**: Problem persists
### ❌ Disable and re-enable extension
- Disabled extension → Reload → Re-enabled → Reload
- **Result**: Problem persists
### ❌ Full Cursor restart
- Complete quit (`Cmd + Q`) and restart
- **Result**: Problem persists
## Key Findings
1. **Data Integrity**: Session files (`*.jsonl`) confirm API requests succeed and responses are complete
2. **Functional Separation**: Terminal CLI works perfectly; issue isolated to webview
3. **Timing Issue**: Brief content visibility on reopen suggests initialization/communication race condition
4. **Service Worker Issue**: Controller mismatch error indicates SW version/ID conflict
5. **Client Not Ready**: Multiple `callClient: client not ready` errors suggest initialization sequence problem
## Expected Behavior
Right webview should:
- ✅ Initialize client connection properly
- ✅ Receive and display API responses
- ✅ Render conversation content normally
- ✅ Match terminal CLI experience
## Actual Behavior
Right webview:
- ❌ Shows "Crunching..." loading state indefinitely
- ❌ Cannot display conversation content
- ❌ Throws `callClient: client not ready` errors
- ❌ Service Worker controller mismatch
### Claude Model
None
### Is this a regression?
Yes, this worked in a previous version
### Last Working Version
2.0.70
### Claude Code Version
2.1.5
### Platform
Anthropic API
### Operating System
macOS
### Terminal/Shell
Terminal.app (macOS)
### Additional Information
## Additional Context
- Terminal CLI and VS Code extension share the same login state (same `device_id`)
- Both interfaces use the same `~/.claude/` configuration directory
- Issue appears related to webview Service Worker and client initialization timing
- **All attempted solutions have failed** - this requires a code fix
## Suggested Fixes
1. **Fix client initialization sequence**: Ensure Service Worker is ready before attempting communication
2. **Handle Service Worker controller mismatch**: Add logic to handle SW version/ID mismatches gracefully
3. **Add retry mechanism**: When `callClient: client not ready`, automatically retry instead of failing
4. **Improve initialization timing**: Ensure all dependencies (SW, client, message channels) are ready before starting communication
5. **Add readiness checks**: Check client ready state before calling, avoid calls when not ready
## Workaround
Currently, the only working solution is to use terminal mode:
- Set `"claudeCode.useTerminal": true` in settings
- This allows using Claude Code in terminal, avoiding webview issuesThis issue has 3 comments on GitHub. Read the full discussion on GitHub ↗