LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • Client
  • AsyncClient
  • Run Helpers
  • Run Trees
  • Evaluation
  • Schemas
  • Utilities
  • Wrappers
  • Anonymizer
  • Testing
  • Expect API
  • Middleware
  • Pytest Plugin
  • Deployment SDK
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

OverviewClientAsyncClientRun HelpersRun TreesEvaluationSchemasUtilitiesWrappersAnonymizerTestingExpect APIMiddlewarePytest PluginDeployment SDK
Language
Theme
Pythonlangsmithsandbox_async_sandboxAsyncSandboxreconnect
Method●Since v0.7

reconnect

Reconnect to a running or recently-finished command.

Resumes output from the given byte offsets. Any output produced while the client was disconnected is replayed from the server's ring buffer.

Copy
reconnect(
  self,
  command_id: str,
  *,
  stdout_offset: int = 0,
  stderr_offset: int = 0,
  headers: RequestHeaders = None
) -> AsyncCommandHandle

Parameters

NameTypeDescription
command_id*str

The command ID from handle.command_id.

stdout_offsetint
Default:0

Byte offset to resume stdout from (default: 0).

stderr_offsetint
Default:0

Byte offset to resume stderr from (default: 0).

View source on GitHub