sandbox_from_runtime() and ensure_sandbox_initialized() write sandbox_id into runtime.context after acquiring a sandbox. When lazy_init=True and no context is supplied to the graph run, runtime.context is None (the LangGraph default), causing a TypeError on the assignment. Add `if runtime.context is not None` guards at all three write sites. Reads already had equivalent guards (e.g. `runtime.context.get(...) if runtime.context else None`); this brings writes into line. |
||
|---|---|---|
| .. | ||
| local | ||
| __init__.py | ||
| exceptions.py | ||
| file_operation_lock.py | ||
| middleware.py | ||
| sandbox.py | ||
| sandbox_provider.py | ||
| search.py | ||
| security.py | ||
| tools.py | ||