Title: bug: WebTerminal will query /api/v2/workspaceagents/
Open Graph Title: bug: WebTerminal will query /api/v2/workspaceagents/
X Title: bug: WebTerminal will query /api/v2/workspaceagents/
Description: Is there an existing issue for this? I have searched the existing issues Current Behavior If you open a web terminal then stop the associated workspace, the terminal will continue to query the Coder API at /api/v2/workspaceagents//pty in...
Open Graph Description: Is there an existing issue for this? I have searched the existing issues Current Behavior If you open a web terminal then stop the associated workspace, the terminal will continue to query the Code...
X Description: Is there an existing issue for this? I have searched the existing issues Current Behavior If you open a web terminal then stop the associated workspace, the terminal will continue to query the Code...
Opengraph URL: https://github.com/coder/coder/issues/20826
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"bug: WebTerminal will query /api/v2/workspaceagents/\u003cagentID>/pty forever","articleBody":"### Is there an existing issue for this?\n\n- [x] I have searched the existing issues\n\n### Current Behavior\n\nIf you open a web terminal then stop the associated workspace, the terminal will continue to query the Coder API at /api/v2/workspaceagents/\u003cagentID>/pty indefinitely.\n\nIt will still query the outdated AgentID even if the workspace a subsequently re-started.\n\nThis causes unnecessary logspam, since we log 502 errors at warning level.\n\n### Relevant Log Output\n\n```shell\n2025-11-10 11:57:59.251 [warn] coderd: GET host=coder.example.com path=/api/v2/workspaceagents/e3d8c7ac-d192-4a54-8346-45484623935b/pty proto=HTTP/1.1 remote_addr=REDACTED start=\"2025-11-10T13:57:59.228382111+02:00\" requestor_name=REDACTED took=23.082705ms status_code=502\n```\n\n### Expected Behavior\n\nWhen the workspace is stopped, the terminal should notice and stop querying. Ideally it should display an error saying the window should be closed.\n\n### Steps to Reproduce\n\n1. Start the web terminal on a workspace\n2. Stop the workspace\n3. Wait a minute or so\n\n### Environment\n\n_No response_\n\n### Additional Context\n\n_No response_","author":{"url":"https://github.com/spikecurtis","@type":"Person","name":"spikecurtis"},"datePublished":"2025-11-19T10:54:30Z","url":"https://github.com/coder/coder/issues/20826"}
| 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:131850d9-0b4e-447e-06e2-8794f9579df3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9504:311640:22ADF0D:2C120CC:6B017FF7 |
| html-safe-nonce | 513d52e7fcda43a00f59df467affe41f3b8bcbe7f5f556f5b323aa4013b5db79 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NTA0OjMxMTY0MDoyMkFERjBEOjJDMTIwQ0M6NkIwMTdGRjciLCJ2aXNpdG9yX2lkIjoiOTAwMjEzNzU2NzgzNTkxNDE2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | c8c35e86359776bde4c98e1ce2f4244c15e085783a3dceb01ac8bfc2a5c54a25 |
| hovercard-subject-tag | issue:3642171608 |
| 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/coder/20826/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ca17d185939f2545fd71cf363f71043d8536e2e1b001fe9eafd3eafb7c9bf6b4/coder/coder/issues/20826 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ca17d185939f2545fd71cf363f71043d8536e2e1b001fe9eafd3eafb7c9bf6b4/coder/coder/issues/20826 |
| og:image:alt | Is there an existing issue for this? I have searched the existing issues Current Behavior If you open a web terminal then stop the associated workspace, the terminal will continue to query the Code... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | spikecurtis |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/coder/coder git https://github.com/coder/coder.git |
| octolytics-dimension-user_id | 95932066 |
| octolytics-dimension-user_login | coder |
| octolytics-dimension-repository_id | 440752086 |
| octolytics-dimension-repository_nwo | coder/coder |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 440752086 |
| octolytics-dimension-repository_network_root_nwo | coder/coder |
| 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