Title: feat: keep Copilot BYOK agent turns alive in server Agent Host by khanhkit · Pull Request #8047 · coder/code-server · GitHub
Open Graph Title: feat: keep Copilot BYOK agent turns alive in server Agent Host by khanhkit · Pull Request #8047 · coder/code-server
X Title: feat: keep Copilot BYOK agent turns alive in server Agent Host by khanhkit · Pull Request #8047 · coder/code-server
Description: Fixes #8046 Motivation code-server is a remote IDE, so long-running agent work should be owned by a server-side lifecycle rather than by a browser tab. For direct-capable Copilot Chat BYOK providers, this change lets the remote Agent Host own model execution so an active turn is not tied to renderer/tab lifetime. Design Direct-capable BYOK providers are synchronized to Agent Host as bounded, ephemeral descriptors and registered directly with the server-side Copilot SDK. Provider configurations that cannot be represented faithfully stay on the existing renderer bridge rather than being silently normalized. Credential-bearing syncEphemeralByokModels data stays process-memory-only and is centrally redacted before AHP JSONL serialization. Model capability metadata (vision, tool calling, reasoning effort) is preserved. Agent Host Changes-pill defaults follow isolation when there is no provider override: folder -> Session Changes, worktree -> Branch Changes. Native Copilot authentication semantics are not bypassed; this change is for the direct BYOK path. Files changed patches/copilot-background-byok.diff patches/copilot-agenthost-session-changes.diff patches/series Current VS Code 1.141 verification Current PR head: 73f71d62f4b26c04dd50b595a3837231a1b5b6aa Pinned VS Code gitlink: 2a59476c9bfcb90b3ddc372c36762471b7dfad1c (VS Code 1.141) Executed on the 1.141 port: full code-server patch series clean apply: 31/31; regenerated feature patches reproduce 22/22 target files byte-for-byte from the validated scratch tree; copilotSessionLauncher.test: 109/109 pass; byokLmBridgeRegistry.test: 11/11 pass; protocolServerHandler.test: 175/175 pass; ahpJsonlLogger.test: 14/14 pass, including the credential-redaction sentinel; browser AgentHostByokLmHandler: 22/22 pass; browser AgentHostSessionInputPills: 22/22 pass, including folder -> Session Changes. Exact-head isolated ARM64 release verification is now GREEN for 73f71d62f4b26c04dd50b595a3837231a1b5b6aa: full build:vscode completed (including core-ci desktop/server/server-web bundles), code-server build completed, release materialized successfully, and a fresh out-of-container checksum verification passed 5897/5897 files. The built runtime reports 73f71d62f4b26c04dd50b595a3837231a1b5b6aa with Code 1.141.0. GitHub Actions status Upstream Build run 37796020383 was created for exact head 73f71d62f4b26c04dd50b595a3837231a1b5b6aa, but GitHub currently reports action_required with zero jobs created. The workflow is waiting for the repository's fork-workflow approval; no CI test has executed or failed yet. Historical note The earlier VS Code 1.140 candidate 95c0eb85d4265925751949f729851901e8e9db0d passed its isolated build, fork CI, and live background/detach acceptance. Those results are historical evidence only and are not presented as exact-head verification for this 1.141 port. Upstream coordination A code-server maintainer suggested upstreaming this behavior directly to VS Code rather than maintaining the server-ownership change as a code-server patch. VS Code already tracks the exact remote-BYOK ownership/continuity problem in microsoft/vscode#340335, under the broader BYOK plan in microsoft/vscode#340086. The VS Code direction is Agent Host-owned model-provider plugins rather than a direct port of chatLanguageModels.json. The validated implementation and evidence from this PR have been posted to that issue for reference: microsoft/vscode#340335 (comment). This PR remains open as the exact tested reference. I am not opening a competing VS Code implementation until the owner confirms which pieces should be adapted to the plugin-provider direction.
Open Graph Description: Fixes #8046 Motivation code-server is a remote IDE, so long-running agent work should be owned by a server-side lifecycle rather than by a browser tab. For direct-capable Copilot Chat BYOK provider...
X Description: Fixes #8046 Motivation code-server is a remote IDE, so long-running agent work should be owned by a server-side lifecycle rather than by a browser tab. For direct-capable Copilot Chat BYOK provider...
Opengraph URL: https://github.com/coder/code-server/pull/8047
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
| 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 | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:ca79b76d-f708-f8ca-c29a-fdb8e3415ba8 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D614:BEE9A:B8C656:10327A9:6B04372A |
| html-safe-nonce | 31e91280649a1d3aaede6aefe2adf9bb549b6a5b4a161182dd0c8e52f8c3e4e9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENjE0OkJFRTlBOkI4QzY1NjoxMDMyN0E5OjZCMDQzNzJBIiwidmlzaXRvcl9pZCI6IjcwMTgzMzg2NTQ5NzIyOTQ5NTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a6b31671605052e461868e2162a1ddb428e6eaee1eca961930ca2a9f6abcd0aa |
| hovercard-subject-tag | pull_request:4784885467 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/coder/code-server/pull/8047/files |
| twitter:image | https://avatars.githubusercontent.com/u/43664443?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/43664443?s=400&v=4 |
| og:image:alt | Fixes #8046 Motivation code-server is a remote IDE, so long-running agent work should be owned by a server-side lifecycle rather than by a browser tab. For direct-capable Copilot Chat BYOK provider... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b7a1d2b9101496921b08579fbee988d014345aef2f5bd660d1f8c7332d81560e |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c3dd496c3da6ea6b77e69c09279d2b81604654f1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | no-cache |
Viewport: width=device-width