style(runtime): remove unused import stat in session_manager.py

This commit is contained in:
Manideep Malyala 2026-08-23 23:26:53 +05:30
parent ad5d219583
commit 3774c2eefd

View file

@ -8,8 +8,6 @@ import sys
from pathlib import Path
from typing import TYPE_CHECKING, Any
import stat
from agents.sandbox.entries import BaseEntry, Dir, File, LocalDir
from agents.sandbox.manifest import Environment, Manifest, SandboxPathGrant
@ -138,12 +136,8 @@ def build_manifest_entries(local_sources: list[dict[str, Any]]) -> dict[str | Pa
if not ws_subdir or not host_path:
continue
resolved = Path(host_path).expanduser().resolve()
# Use a symlink-safe walker when the path contains symlinks so that
# the SDK LocalDir materializer (which rejects symlinks) does not
# abort sandbox startup for common project layouts.
has_symlinks = any(p.is_symlink() for p in resolved.rglob("*"))
if has_symlinks:
logger.info("mount-free: %s contains symlinks — using symlink-safe uploader", resolved)
entries[ws_subdir] = _symlink_safe_dir_entry(resolved)
else:
entries[ws_subdir] = LocalDir(src=resolved)