feat(sessions): add stop run control for cloud runs#3382
Conversation
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
a8cad3d to
f57936c
Compare
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
f57936c to
48eb6b9
Compare
There was a problem hiding this comment.
This is a 23-file, 782-line behavioral feature (stop cloud run) touching session state, archive flow, API calls, and UI — it exceeded the automated size gate and has zero reviews. The implementation looks reasonable and well-tested, but a change of this scope affecting cloud task lifecycle needs at least one human reviewer before auto-approval.
|
48eb6b9 to
a2870c0
Compare
Problem
There is no way to stop a cloud run from PostHog Code.
Esconly interrupts the current response (a turn-levelcancelcommand), so the sandbox keeps running until the backend's inactivity timeout.stop_cloud_run.mp4
closes #2634
Changes
add a Stop run button for active cloud sessions next to Continue locally, with a confirmation dialog and a disabled Stopping... state until the run reaches a terminal status.
add
CloudTaskService.stop, exposed through the shared host router, to call the new cancel endpoint and automatically retry transient 503/5xx failures.add
sessionService.stopCloudRunto handle cloud run cancellation, ignore non-cloud or terminal sessions, and clear the pending state if the request fails.add a dedicated
TASK_RUN_STOPPEDanalytics event, separate from the existingTASK_RUN_CANCELLEDevent used for turn interrupts.