MCPcopy Index your code
hub / github.com/codeaashu/claude-code / reconnectSession

Function reconnectSession

src/bridge/bridgeApi.ts:358–385  ·  view source on GitHub ↗
(
      environmentId: string,
      sessionId: string,
    )

Source from the content-addressed store, hash-verified

356 },
357
358 async reconnectSession(
359 environmentId: string,
360 sessionId: string,
361 ): Promise<void> {
362 validateBridgeId(environmentId, 'environmentId')
363 validateBridgeId(sessionId, 'sessionId')
364
365 debug(
366 `[bridge:api] POST /v1/environments/${environmentId}/bridge/reconnect session_id=${sessionId}`,
367 )
368
369 const response = await withOAuthRetry(
370 (token: string) =>
371 axios.post(
372 `${deps.baseUrl}/v1/environments/${environmentId}/bridge/reconnect`,
373 { session_id: sessionId },
374 {
375 headers: getHeaders(token),
376 timeout: 10_000,
377 validateStatus: s => s < 500,
378 },
379 ),
380 'ReconnectSession',
381 )
382
383 handleErrorStatus(response.status, response.data, 'ReconnectSession')
384 debug(`[bridge:api] POST .../bridge/reconnect -> ${response.status}`)
385 },
386
387 async heartbeatWork(
388 environmentId: string,

Callers

nothing calls this directly

Calls 6

validateBridgeIdFunction · 0.85
withOAuthRetryFunction · 0.85
getHeadersFunction · 0.85
handleErrorStatusFunction · 0.85
postMethod · 0.80
debugFunction · 0.70

Tested by

no test coverage detected