Title: fix: stop logging a false agent failure when the browser disconnects by tristan-mouchet · Pull Request #592 · ycode/ycode · GitHub
Open Graph Title: fix: stop logging a false agent failure when the browser disconnects by tristan-mouchet · Pull Request #592 · ycode/ycode
X Title: fix: stop logging a false agent failure when the browser disconnects by tristan-mouchet · Pull Request #592 · ycode/ycode
Description: Summary When the browser drops its connection mid-run (reload, network blip, or the user giving up), the agent chat stream logged a misleading Agent run failed: Controller is already closed. The run hadn't failed — there was simply nobody left to send events to. Once the client is gone the ReadableStream controller is closed, so enqueueing into it throws ERR_INVALID_STATE. Because that happens inside the runAgent try/catch, the failure was caught and reported as an agent error that no one could see, hiding genuine failures in the logs. Extracted from #574 so it can land on its own. Changes Track whether the SSE reader is gone and drop events destined for it instead of throwing Guard the final [DONE] frame and controller.close() the same way Test plan Start an agent run in the builder, then reload the page mid-run — server logs should no longer show Agent run failed: Controller is already closed Complete a normal agent run and confirm the stream still terminates with [DONE] and the panel settles Cancel a run with the stop button and confirm no stray errors are logged
Open Graph Description: Summary When the browser drops its connection mid-run (reload, network blip, or the user giving up), the agent chat stream logged a misleading Agent run failed: Controller is already closed. The ru...
X Description: Summary When the browser drops its connection mid-run (reload, network blip, or the user giving up), the agent chat stream logged a misleading Agent run failed: Controller is already closed. The ru...
Opengraph URL: https://github.com/ycode/ycode/pull/592
X: @github
Domain: github.com
| 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:89180830-2ca4-5314-a134-35209015075d |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | BE04:38D18E:EB6DF:130635:6AFE446D |
| html-safe-nonce | 2f110a86ad528791e453531811925ffd5d9c32c213538e9fb683324574a5adb2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRTA0OjM4RDE4RTpFQjZERjoxMzA2MzU6NkFGRTQ0NkQiLCJ2aXNpdG9yX2lkIjoiNjQ1MDExNzIwNDcyMDM3MDc5NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b3e0a9c3d29b99d07ba0ea41615f8be62113604c199111d098789664dd7c87be |
| hovercard-subject-tag | pull_request:4797624196 |
| 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/ycode/ycode/pull/592/files |
| twitter:image | https://avatars.githubusercontent.com/u/82507011?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/82507011?s=400&v=4 |
| og:image:alt | Summary When the browser drops its connection mid-run (reload, network blip, or the user giving up), the agent chat stream logged a misleading Agent run failed: Controller is already closed. The ru... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | f1a5901e2377b0af2a0b303f9528678f1475d04b9219dca1e993344196eaa07c |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/ycode/ycode git https://github.com/ycode/ycode.git |
| octolytics-dimension-user_id | 65892203 |
| octolytics-dimension-user_login | ycode |
| octolytics-dimension-repository_id | 1165452593 |
| octolytics-dimension-repository_nwo | ycode/ycode |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1165452593 |
| octolytics-dimension-repository_network_root_nwo | ycode/ycode |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ce393ea11ad276623b946bc9663d3e7d6f564275 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width