fix workflow run browser context missing problem (#1902)

This commit is contained in:
Shuchang Zheng
2025-03-07 15:06:24 -08:00
committed by GitHub
parent 2d2ad2f3d9
commit bc8e458ed1
2 changed files with 9 additions and 4 deletions

View File

@@ -138,7 +138,9 @@ class ForgeAgent:
task_url = task_block.url
if task_url is None:
browser_state = app.BROWSER_MANAGER.get_for_workflow_run(workflow_run_id=workflow_run.workflow_run_id)
browser_state = app.BROWSER_MANAGER.get_for_workflow_run(
workflow_run_id=workflow_run.workflow_run_id, parent_workflow_run_id=workflow_run.parent_workflow_run_id
)
if browser_state is None:
raise MissingBrowserState(workflow_run_id=workflow_run.workflow_run_id)