Title: ntermittent dead renderer-to-extension-host RPC on load: restored workbench state (browser storage) races the web-worker exthost handshake; incognito always healthy · Issue #8051 · coder/code-server · GitHub
Open Graph Title: ntermittent dead renderer-to-extension-host RPC on load: restored workbench state (browser storage) races the web-worker exthost handshake; incognito always healthy · Issue #8051 · coder/code-server
X Title: ntermittent dead renderer-to-extension-host RPC on load: restored workbench state (browser storage) races the web-worker exthost handshake; incognito always healthy · Issue #8051 · coder/code-server
Description: Is there an existing issue for this? I have searched the existing issues OS/Web Information Web Browser: Microsoft Edge (Chromium) on Windows 11 x64 Local OS: Windows 11 x64 Remote OS: Linux (cloud VM) Remote Architecture: x86_64 code-se...
Open Graph Description: Is there an existing issue for this? I have searched the existing issues OS/Web Information Web Browser: Microsoft Edge (Chromium) on Windows 11 x64 Local OS: Windows 11 x64 Remote OS: Linux (cloud...
X Description: Is there an existing issue for this? I have searched the existing issues OS/Web Information Web Browser: Microsoft Edge (Chromium) on Windows 11 x64 Local OS: Windows 11 x64 Remote OS: Linux (cloud...
Opengraph URL: https://github.com/coder/code-server/issues/8051
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ntermittent dead renderer-to-extension-host RPC on load: restored workbench state (browser storage) races the web-worker exthost handshake; incognito always healthy","articleBody":"### Is there an existing issue for this?\n\n- [x] I have searched the existing issues\n\n### OS/Web Information\n\n- Web Browser: Microsoft Edge (Chromium) on Windows 11 x64\n- Local OS: Windows 11 x64\n- Remote OS: Linux (cloud VM)\n- Remote Architecture: x86_64\n- code-server --version: 4.140.0\n\n\n### Steps to Reproduce\n\n1. Use a long-lived normal browser profile that has accumulated site data for the code-server origin (approx 4 MB IndexedDB, actively rewritten during use).\n2. Open or reload http://HOST:10029/?folder=WORKSPACE.\n3. Wait 30-45 s for the workbench to boot.\n4. Broken load: explorer tree and previously open editors are restored, but opening any file fails with \"Cannot open editor because the file cannot be found\"; no extension activates (clangd stops at creating its output channel).\n5. Reload: the next load rolls again and may be healthy; a healthy load then stays healthy.\n6. Open the same URL in incognito (no stored site data): first load is healthy and stays healthy.\n7. Server-side during a broken load: exthost process alive and streaming, eager=0; during a healthy load eager=1. Same server, same minute.\n\n### Expected\n\nEvery page load establishes a working renderer-to-extension-host RPC channel: restored editors open their files and all extensions activate, regardless of how much session state the browser profile holds.\n\n### Actual\n\nOn most loads in a state-rich profile the renderer never answers exthost-initiated RPC for the whole session: extensions hang at activation step 1 and restored editors fail with file-not-found, while the explorer tree (restored from cache) is populated. Loads in incognito/fresh profiles are consistently healthy. Per-load outcome is independent (a race), not persistent corruption.\n\n### Logs\n\n```shell\nBrowser console (broken load):\n[WARNING] The web worker extension host is started in a same-origin iframe!\n[INFO] Creating a socket (renderer-ExtensionHost-...) was successful after 190 ms.\n[INFO] [AgentHost:remote] Connected; clientId=...\n[INFO] [RemoteAgentHost] Reconciling: desired=[], current=[]\n[ERROR] (empty message) x3\n\nServer side: exthost alive, bidirectional traffic flowing, renderer never replies;\neager=0 (broken) vs eager=1 (healthy).\n\nStatistics, normal profile, single client: 5 loads -> 4 broken\n(20:22, 20:25:27, 20:33, 20:42) / 1 healthy (20:25:13);\nhistorical single-connection sessions 31 broken vs 13 healthy;\nincognito first load healthy.\n\nClient storage: origin IndexedDB approx 4 MB, log file rewritten during use;\nclearing site data produced a healthy run.\n```\n\n### Screenshot/Video\n\n_No response_\n\n### Does this bug reproduce in native VS Code?\n\nI did not test native VS Code\n\n### Does this bug reproduce in VS Code web?\n\nI did not test VS Code web\n\n### Does this bug reproduce in GitHub Codespaces?\n\nI did not test GitHub Codespaces\n\n### Are you accessing code-server over a secure context?\n\n- [ ] I am using a secure context.\n\n### Notes\n\nHypothesis: at boot the workbench (a) wires the message channel to the web-worker extension host (same-origin iframe) and (b) replays restored session state from browser storage; these are not ordered. With a thick restore payload the restore path issues exthost-dependent requests before the renderer reply path is ready and the handshake/reply wiring is lost for that load; the exthost keeps sending RPC nobody answers (eager=0). Without restore state (incognito, fresh profile, after Clear site data) boot does essentially only the handshake and wins consistently.\n\nWorkarounds that change the odds: clear site data for the origin (after saving files); close all editors (Ctrl+K W) before closing/reloading; dedicated lightweight browser profile; wait 30-45 s before judging a reload (fast reloads kill healthy exthosts, observed a host killed at ~11 s).\n\nRelated: #4212 and #7914 (workbench state in browser storage; v4.141.0 adds opt-in --enable-remote-storage). Question: does enabling it remove this trigger, and does it cover extension-owned browser storage (language-server caches, dirty-file backups) as well? Also #7384 (restore triggers unexpected reloads, closed not_planned) and #7391 / #3140 (extensions unusable / unable to activate) look like downstream symptoms.\n\nRequested: order/queue restore-path requests until the reply channel is ready (or retry), and make handshake failure detectable and self-healing instead of a silently dead channel.\n\nCaveat: not tested in native VS Code, vscode web or Codespaces; the three dropdowns are set to \"No\" meaning observed only in code-server.\n\nHappy to provide paired healthy/broken client console logs and server exthost logs with eager values and timelines.","author":{"url":"https://github.com/gkwfhv","@type":"Person","name":"gkwfhv"},"datePublished":"2026-10-09T16:16:32Z","url":"https://github.com/coder/code-server/issues/8051"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b4a655da-7219-ae0d-a0ef-efa5d014bc11 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DBA2:19B6A2:84914E:AF1E93:6B01AF05 |
| html-safe-nonce | 8f0274b8157a1a00f97d951961f57645cff2b398231f01bcb1b73aca7aa9dbe7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQkEyOjE5QjZBMjo4NDkxNEU6QUYxRTkzOjZCMDFBRjA1IiwidmlzaXRvcl9pZCI6IjQwMzMzOTU5ODEyMTgzMjgzMjUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5fce2d0ec5da14d8eb8cec3c3e54c77356f619806c60eb7cc8974d1eb57a748b |
| hovercard-subject-tag | issue:5781217184 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/coder/code-server/8051/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b8f917809ebf210692ce298df14bee6b2856fcdf556e4c34977fb8b0d9c1d569/coder/code-server/issues/8051 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b8f917809ebf210692ce298df14bee6b2856fcdf556e4c34977fb8b0d9c1d569/coder/code-server/issues/8051 |
| og:image:alt | Is there an existing issue for this? I have searched the existing issues OS/Web Information Web Browser: Microsoft Edge (Chromium) on Windows 11 x64 Local OS: Windows 11 x64 Remote OS: Linux (cloud... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | gkwfhv |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/coder/code-server git https://github.com/coder/code-server.git |
| octolytics-dimension-user_id | 95932066 |
| octolytics-dimension-user_login | coder |
| octolytics-dimension-repository_id | 172953845 |
| octolytics-dimension-repository_nwo | coder/code-server |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 172953845 |
| octolytics-dimension-repository_network_root_nwo | coder/code-server |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width