MCPcopy Create free account
hub / github.com/WJX20/claude-code / aborted

Method aborted

src/cli/structuredIO.ts:496–510  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

494 this.onControlRequestSent(message)
495 }
496 const aborted = () => {
497 this.outbound.enqueue({
498 type: 'control_cancel_request',
499 request_id: requestId,
500 })
501 // Immediately reject the outstanding promise, without
502 // waiting for the host to acknowledge the cancellation.
503 const request = this.pendingRequests.get(requestId)
504 if (request) {
505 // Track the tool_use ID as resolved before rejecting, so that a
506 // late response from the host is ignored by the orphan handler.
507 this.trackResolvedToolUseId(request.request)
508 request.reject(new AbortError())
509 }
510 }
511 if (signal) {
512 signal.addEventListener('abort', aborted, {
513 once: true,

Callers

nothing calls this directly

Calls 4

rejectMethod · 0.80
enqueueMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected