From 5c6b9b26b24d14607f37a28e2e75d03d086419c2 Mon Sep 17 00:00:00 2001 From: aran-yogesh Date: Thu, 12 Feb 2026 16:32:45 -0800 Subject: [PATCH] fix: resolve circular import in commit_and_open_pr --- apps/agent/agent/tools/commit_and_open_pr.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/agent/agent/tools/commit_and_open_pr.py b/apps/agent/agent/tools/commit_and_open_pr.py index 66dd3103..d86d57ab 100644 --- a/apps/agent/agent/tools/commit_and_open_pr.py +++ b/apps/agent/agent/tools/commit_and_open_pr.py @@ -5,7 +5,6 @@ from typing import Any from langgraph.config import get_config from ..encryption import decrypt_token -from ..server import _create_langsmith_sandbox from ..utils.github import ( create_github_pr, get_github_default_branch, @@ -134,6 +133,9 @@ def commit_and_open_pr( if not sandbox_id: return {"success": False, "error": "No sandbox found for thread", "pr_url": None} + # Import here to avoid circular import with server.py + from ..server import _create_langsmith_sandbox + sandbox_backend = _create_langsmith_sandbox(sandbox_id) SANDBOX_BACKENDS[thread_id] = sandbox_backend