Skip to content

Copilot repeats 5x "Request failed due to a transient API error. Retrying" and "CAPIError: 503" #2166

@Coekjan

Description

@Coekjan

Describe the bug

When I use Claude Opus 4.6 / Sonnet 4.6 and interact with it for several rounds, Copilot CLI often gets stuck and reports:

Request failed due to a transient API error. Retrying...

for 5 times. And finally reports:

Execution failed: Error: Failed to get response from the AI model; retried 5 times (total retry wait time: ~90 seconds) Last error: CAPIError: 503 {"error":{"message":"HTTP/2 GOAWAY connection terminated","type":"connection_error"}}

These days, I have met this issue many times. And when I met it, I switched the model to GPT-5.4, chat with GPT-5.4 for one round, switched back to Claude Opus 4.6, and finally Copilot CLI worked normally again.

I am a Copilot Pro+ user, and this issue is quite annoying for me! Hope it gets fixed as soon as possible.

Affected version

GitHub Copilot CLI 1.0.9

Steps to reproduce the behavior

  1. /model and choose Claude Opus 4.6 / Claude Sonnet 4.6
  2. prompt it, and when the session gets long, the issue could be reproduced

Expected behavior

No Execution failed: Error: Failed to get response from the AI model; retried 5 times (total retry wait time: ~90 seconds) Last error: CAPIError: 503 {"error":{"message":"HTTP/2 GOAWAY connection terminated","type":"connection_error"}} again!

Additional context

  • I am on x86_64 Linux and ssh + tmux + bash
  • The log:
2026-03-19T12:45:30.030Z [INFO] --- Start of group: Sending request to the AI model ---
2026-03-19T12:45:30.064Z [DEBUG] [telemetry-queue] Flushing 1 events (2570 B → 1246 B gzipped)
2026-03-19T12:45:34.940Z [WARNING] [StreamingChunkDisplay] Received a chunk with a different streaming ID: f711aee1-83be-4b01-b56f-5e3069d245b3
2026-03-19T12:46:36.202Z [INFO] Proxy configuration: HTTP_PROXY=http://192.168.5.58:1080, HTTPS_PROXY=http://192.168.5.58:1080, NO_PROXY=(not set)
2026-03-19T12:46:36.203Z [WARNING] Detected HTTP/2 GOAWAY error, resetting global dispatcher and retrying the request.
2026-03-19T12:46:36.205Z [ERROR] error (Request-ID null)
2026-03-19T12:46:36.206Z [ERROR] {
  "status": 503,
  "headers": {},
  "requestID": null,
  "error": {
    "error": {
      "message": "HTTP/2 GOAWAY connection terminated",
      "type": "connection_error"
    }
  },
  "request_id": null,
  "ghRequestId": null,
  "name": "CAPIError",
  "cause": {
    "cause": {
      "name": "TypeError",
      "message": "terminated",
      "stack": "TypeError: terminated\n    at D3e.m (file:///home/user/.copilot/pkg/universal/1.0.9/app.js:164:43943)\n    at D3e.emit (node:events:508:28)\n    at D3e.terminate (file:///home/user/.copilot/pkg/universal/1.0.9/app.js:164:30659)\n    at Object.onError (file:///home/user/.copilot/pkg/universal/1.0.9/app.js:164:46240)\n    at sft.onError (file:///home/user/.copilot/pkg/universal/1.0.9/app.js:37:33212)\n    at Object.Qgo [as errorRequest] (file:///home/user/.copilot/pkg/universal/1.0.9/app.js:37:23127)\n    at TLSSocket.$0o (file:///home/user/.copilot/pkg/universal/1.0.9/app.js:49:12551)\n    at TLSSocket.emit (node:events:520:35)\n    at node:net:346:12\n    at Socket.done (node:_tls_wrap:649:7)",
      "cause": {
        "name": "SocketError",
        "code": "UND_ERR_SOCKET",
        "socket": {
          "localAddress": "10.244.38.65",
          "localPort": 44102,
          "remoteAddress": "192.168.5.58",
          "remotePort": 1080,
          "remoteFamily": "IPv4",
          "bytesWritten": 327270,
          "bytesRead": 4946
        },
        "message": "other side closed",
        "stack": "SocketError: other side closed\n    at TLSSocket.q0o (file:///home/user/.copilot/pkg/universal/1.0.9/app.js:49:12066)\n    at TLSSocket.emit (node:events:520:35)\n    at endReadableNT (node:internal/streams/readable:1701:12)\n    at process.processTicksAndRejections (node:internal/process/task_queues:89:21)"
      }
    },
    "name": "Error",
    "message": "terminated",
    "stack": "Error: terminated\n    at t.Dyr (file:///home/user/.copilot/pkg/universal/1.0.9/app.js:1990:4649)\n    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)"
  },
  "message": "503 {\"error\":{\"message\":\"HTTP/2 GOAWAY connection terminated\",\"type\":\"connection_error\"}}",
  "stack": "CAPIError: 503 {\"error\":{\"message\":\"HTTP/2 GOAWAY connection terminated\",\"type\":\"connection_error\"}}\n    at t.fromAPIError (file:///home/user/.copilot/pkg/universal/1.0.9/app.js:2007:949)\n    at wst.getCompletionWithTools (file:///home/user/.copilot/pkg/universal/1.0.9/app.js:2007:10970)\n    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)\n    at async mxe.getCompletionWithTools (file:///home/user/.copilot/pkg/universal/1.0.9/app.js:2019:2292)\n    at async t.runAgenticLoop (file:///home/user/.copilot/pkg/universal/1.0.9/app.js:2473:36636)\n    at async t.processQueuedItems (file:///home/user/.copilot/pkg/universal/1.0.9/app.js:2473:5634)\n    at async t.processQueue (file:///home/user/.copilot/pkg/universal/1.0.9/app.js:2473:896)\n    at async t.send (file:///home/user/.copilot/pkg/universal/1.0.9/app.js:2471:3497)\n    at async file:///home/user/.copilot/pkg/universal/1.0.9/app.js:4968:1634"
}
2026-03-19T12:46:36.206Z [DEBUG] Failed to get response from the AI model: CAPIError: 503 {"error":{"message":"HTTP/2 GOAWAY connection terminated","type":"connection_error"}}
2026-03-19T12:46:36.206Z [DEBUG] Inner error: {
  "error": {
    "message": "HTTP/2 GOAWAY connection terminated",
    "type": "connection_error"
  }
}
2026-03-19T12:46:36.206Z [DEBUG] Retrying after 7.454450470719868 seconds (API error)...
2026-03-19T12:46:43.677Z [DEBUG] Retrying after 9 seconds... Will try again now!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions