fix(computer): abort execution on stop by checking destroyed in screenshotBase64#2016
Merged
fix(computer): abort execution on stop by checking destroyed in screenshotBase64#2016
Conversation
…ution on stop After clicking stop in Computer Playground, the agent continued operating because ComputerDevice uses stateless system calls (libnut) that don't depend on any connection. Unlike Playwright/Android/iOS where destroy() breaks the connection and causes subsequent operations to naturally fail, ComputerDevice's destroy() only set a flag without blocking further calls. Add a destroyed check in screenshotBase64() — the natural chokepoint of every execution cycle — so the planning loop breaks on the next iteration.
…k side effects During cancel, recreateAgent() was creating a new agent immediately, which triggered ComputerDevice.connect() → healthCheck() → mouse movement. This is unnecessary since /execute always creates a fresh agent before each run. Now cancel only destroys the old agent.
Deploying midscene with
|
| Latest commit: |
ff1ca64
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e0da2236.midscene.pages.dev |
| Branch Preview URL: | https://fix-computer-stop-not-aborti.midscene.pages.dev |
EAGzzyCSL
approved these changes
Feb 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
destroy()breaks the device connection and causes subsequent operations to naturally fail,ComputerDeviceuses stateless system calls (libnut) that don't depend on any connection — sodestroy()only set a flag without actually blocking further callsdestroyedcheck inscreenshotBase64(), the natural chokepoint of every execution cycle (plan → screenshot → act → repeat), so the planning loop breaks on the next iterationTest plan