_run_startup_commands() — langchain Function Reference
Architecture documentation for the _run_startup_commands() function in shell_tool.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD c6011545_45bb_9aa6_7568_fa418072d163["_run_startup_commands()"] 4e57a0ff_f1a5_e2e9_6949_569d7cd6d70a["ShellToolMiddleware"] c6011545_45bb_9aa6_7568_fa418072d163 -->|defined in| 4e57a0ff_f1a5_e2e9_6949_569d7cd6d70a 3d2455b7_eaeb_053d_fc17_21aaa32050ca["_create_resources()"] 3d2455b7_eaeb_053d_fc17_21aaa32050ca -->|calls| c6011545_45bb_9aa6_7568_fa418072d163 8b644660_40e4_465a_3e51_e1a3166de4f9["_run_shell_tool()"] 8b644660_40e4_465a_3e51_e1a3166de4f9 -->|calls| c6011545_45bb_9aa6_7568_fa418072d163 da18dc22_e4fc_2b4a_2829_9217c9f5d8f5["execute()"] c6011545_45bb_9aa6_7568_fa418072d163 -->|calls| da18dc22_e4fc_2b4a_2829_9217c9f5d8f5 style c6011545_45bb_9aa6_7568_fa418072d163 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain_v1/langchain/agents/middleware/shell_tool.py lines 725–732
def _run_startup_commands(self, session: ShellSession) -> None:
if not self._startup_commands:
return
for command in self._startup_commands:
result = session.execute(command, timeout=self._execution_policy.startup_timeout)
if result.timed_out or (result.exit_code not in {0, None}):
msg = f"Startup command '{command}' failed with exit code {result.exit_code}"
raise RuntimeError(msg)
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does _run_startup_commands() do?
_run_startup_commands() is a function in the langchain codebase, defined in libs/langchain_v1/langchain/agents/middleware/shell_tool.py.
Where is _run_startup_commands() defined?
_run_startup_commands() is defined in libs/langchain_v1/langchain/agents/middleware/shell_tool.py at line 725.
What does _run_startup_commands() call?
_run_startup_commands() calls 1 function(s): execute.
What calls _run_startup_commands()?
_run_startup_commands() is called by 2 function(s): _create_resources, _run_shell_tool.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free