Skip to content

fix(computer): load the recording steps without the protocol's computer extra - #361

Open
earakely-scale wants to merge 1 commit into
mainfrom
fix/core-imports-without-computer-extra
Open

earakely-scale wants to merge 1 commit into
mainfrom
fix/core-imports-without-computer-extra

Conversation

@earakely-scale

@earakely-scale earakely-scale commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

agent_env.task and the built-in step registry import again without agentenv-framework-protocol's computer extra. The recording steps (start_computer_recording, end_computer_recording and teardown's end_open_recordings) now import agentenv_protocol.computer when 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 imported agentenv_protocol.computer.card and .manifest at load. Importing either runs agentenv_protocol/computer/__init__.py, which loads the driver SDK and recording.py, and recording.py imports PyAV and Pillow. Both come only from the protocol's computer extra, so any install without the extra fails on import agent_env.task:

agentenv_protocol/computer/recording.py:23: in <module>
    import av
E   ModuleNotFoundError: No module named 'av'

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_recording records the step as failed with the import error, as it does for any other start failure.

Testing

  • New test: a subprocess with av and PIL blocked imports agent_env.task and builds the built-in step registry. On main it fails with ModuleNotFoundError: import of av halted. With this change all 51 built-in steps load.
  • tst/unit/task_step passes: 2076 passed. The recording steps' own suite passes too: 20, including the new test. ruff is clean.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence 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.

  • Tasks load the built-in steps without the optional computer extra.

Reviews (1) · Last reviewed commit: "fix(computer): load the recording steps ..." · Reviewed by Greptile

…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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant