Repository navigation
fix(computer): load the recording steps without the protocol's computer extra - #361
Open
earakely-scale wants to merge 1 commit into
Open
earakely-scale wants to merge 1 commit into
earakely-scale wants to merge 1 commit into
Conversation
…er extra Every task loads the built-in step registry, which imports the recording steps, which imported agentenv_protocol.computer at load. That package needs the `computer` extra (PyAV, Pillow), so since 0.9.1367 an install without it couldn't import agent_env.task. The steps now import it when a recording runs. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This branch has not been deployed
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
agent_env.taskand the built-in step registry import again without agentenv-framework-protocol'scomputerextra. The recording steps (start_computer_recording,end_computer_recordingand teardown'send_open_recordings) now importagentenv_protocol.computerwhen a recording runs, instead of when the module loads.Why
Every task builds the built-in step registry, which imports
task_steps/computer_recording.py, and sandbox teardown imports it too. Since #346 (0.9.1367), that module importedagentenv_protocol.computer.cardand.manifestat load. Importing either runsagentenv_protocol/computer/__init__.py, which loads the driver SDK andrecording.py, andrecording.pyimports PyAV and Pillow. Both come only from the protocol'scomputerextra, so any install without the extra fails onimport agent_env.task:A consumer pinning 0.9.1368 hit this: its worker couldn't import
agent_env.task, and its tests couldn't be collected. This repo's CI installs every extra, so it never saw the failure.A recording still needs the extra. Without it,
start_computer_recordingrecords the step as failed with the import error, as it does for any other start failure.Testing
avandPILblocked importsagent_env.taskand builds the built-in step registry. Onmainit fails withModuleNotFoundError: import of av halted. With this change all 51 built-in steps load.tst/unit/task_steppasses: 2076 passed. The recording steps' own suite passes too: 20, including the new test. ruff is clean.🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; no actionable issues were found.Summary
Moves recording imports into the functions that need them so loading tasks no longer imports the computer package.
Reviews (1) · Last reviewed commit: "fix(computer): load the recording steps ..." · Reviewed by Greptile