Skip to content

Commit d0fab95

Browse files
sjarmakclaude
andcommitted
Fix monkey-patch: sandbox_plugins is a list, not a property
CodeActAgent.sandbox_plugins is a class attribute (list), not a @Property. Use list comprehension to filter out JupyterRequirement instead of .fget/. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent bfef1a8 commit d0fab95

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

agents/harnesses/openhands/agent.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -219,12 +219,10 @@ def create_run_agent_commands(self, instruction: str):
219219
"# OpenHands v1.4.0 hardcodes JupyterRequirement in sandbox_plugins",
220220
"# and the jupyter-kernelgateway cannot bind inside Daytona sandboxes.",
221221
"import openhands.agenthub.codeact_agent.codeact_agent as _ca_mod",
222-
"from openhands.runtime.plugins import AgentSkillsRequirement",
223-
"_orig_plugins = _ca_mod.CodeActAgent.sandbox_plugins.fget",
224-
"@property",
225-
"def _no_jupyter_plugins(self):",
226-
" return [p for p in _orig_plugins(self) if p.name != 'jupyter']",
227-
"_ca_mod.CodeActAgent.sandbox_plugins = _no_jupyter_plugins",
222+
"_ca_mod.CodeActAgent.sandbox_plugins = [",
223+
" p for p in _ca_mod.CodeActAgent.sandbox_plugins",
224+
" if getattr(p, 'name', '') != 'jupyter'",
225+
"]",
228226
"",
229227
"runpy.run_module('openhands.core.main', run_name='__main__')",
230228
])

0 commit comments

Comments
 (0)