MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / sendControlRequest

Function sendControlRequest

source code/bridge/remoteBridgeCore.ts:826–841  ·  view source on GitHub ↗
(request: SDKControlRequest)

Source from the content-addressed store, hash-verified

824 void transport.writeBatch(events)
825 },
826 sendControlRequest(request: SDKControlRequest) {
827 if (authRecoveryInFlight) {
828 logForDebugging(
829 `[remote-bridge] Dropping control_request during 401 recovery: ${request.request_id}`,
830 )
831 return
832 }
833 const event = { ...request, session_id: sessionId }
834 if (request.request.subtype === 'can_use_tool') {
835 transport.reportState('requires_action')
836 }
837 void transport.write(event)
838 logForDebugging(
839 `[remote-bridge] Sent control_request request_id=${request.request_id}`,
840 )
841 },
842 sendControlResponse(response: SDKControlResponse) {
843 if (authRecoveryInFlight) {
844 logForDebugging(

Callers

nothing calls this directly

Calls 3

logForDebuggingFunction · 0.85
reportStateMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected