Skip to content

Commit

Permalink
fix(agent controller): misplaced runtime.connect that cause swebench …
Browse files Browse the repository at this point in the history
…workspace to fail (#4826)
  • Loading branch information
xingyaoww authored Nov 7, 2024
1 parent 932de79 commit dc0e223
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions openhands/core/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ async def run_controller(

if runtime is None:
runtime = create_runtime(config, sid=sid)
await runtime.connect()

event_stream = runtime.event_stream

Expand Down Expand Up @@ -188,8 +189,6 @@ async def on_event(event: Event):

event_stream.subscribe(EventStreamSubscriber.MAIN, on_event, sid)

await runtime.connect()

end_states = [
AgentState.FINISHED,
AgentState.REJECTED,
Expand Down

0 comments on commit dc0e223

Please sign in to comment.