Repository navigation
fix(computer-use): stop macOS capture after resize failure - #3842
Merged
bobleer merged 1 commit intoNov 9, 2026
Merged
Conversation
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
When ScreenCaptureKit rejects a window resize, revoke the matching Computer Use session through the existing generation- and target-scoped stop path. This releases the native capture stream and preserves the first terminal error. The macOS capture fixture now distinguishes an unavailable surface from a successful frame and injects a resize rejection on a real stream.
Type and Areas
Bug fix in the macOS Computer Use provider, shared by Desktop and graphical CLI. Includes a native regression fixture.
Motivation / Impact
In a real macOS Desktop session, an injected ScreenCaptureKit resize error caused screenshot requests to fail while control remained active. The system kept the capture stream until an explicit Stop. With this change, the session stops on failure, replayd confirms the stream was released, and a new sharing session can capture normally.
Verification
node scripts/test-macos-control-capture.mjspassed, including the injected resize error.cargo test --locked -p openbitfun-computer-use --lib control_session::tests::passed all five tests.cargo build --locked -p openbitfun-desktoppassed.node scripts/test-windows-computer-use-native.mjs --check --target x86_64-pc-windows-msvcpassed as a cross-target type check. An Ubuntu Wayland 1.0.8 idle startup check recorded no ScreenCast or RemoteDesktop portal method calls.Reviewer Notes
AI-assisted. Tested on the native macOS Desktop path and with focused provider tests. The Windows and Linux provider code is unchanged.
Checklist