We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5917732 commit cd0aa8cCopy full SHA for cd0aa8c
libs/langchain_v1/langchain/agents/middleware/shell_tool.py
@@ -677,8 +677,10 @@ def _run_shell_tool(
677
if payload.get("restart"):
678
LOGGER.info("Restarting shell session on request.")
679
try:
680
- session.restart()
+ session.stop(self._execution_policy.termination_timeout)
681
+ session.start()
682
self._run_startup_commands(session)
683
+ self._session = session
684
except BaseException as err:
685
LOGGER.exception("Restarting shell session failed; session remains unavailable.")
686
msg = "Failed to restart shell session."
0 commit comments