Skip to content

"Request failed due to a transient API error" on Ubuntu WSL using Copilot CLI #363

Closed as not planned

Description

@matheuszhs

I am experiencing a persistent issue while using the GitHub Copilot CLI within my Ubuntu WSL environment. When attempting to execute a prompt, the CLI repeatedly throws a "transient API error" and gets stuck retrying, failing to return a response.

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

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

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

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

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

✗ Sorry, you've hit a rate limit that restricts the number of Copilot model requests you can make within a specific time period. Please try again in 1 minute. Please review our Terms of
  Service (https://docs.github.com/site-policy/github-terms/github-terms-of-service).

GitHub Copilot v1.0.4

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.04.4 LTS
Release: 24.04
Codename: noble

Activity

  1. github-actions commented on Mar 13, 2026

    @github-actions
    Contributor

    🏗️ Squad Triage — Flight (Lead)

    Issue: #363 — "Request failed due to a transient API error" on Ubuntu WSL using Copilot CLI
    Assigned to: Flight (Lead)
    Reason: No specific domain match — assigned to Lead for further analysis

    @copilot evaluation: No strong capability match — routed to squad member.

    Team roster:

    • Flight (Lead) → label: squad:flight
    • Procedures (Prompt Engineer) → label: squad:procedures
    • EECOM (Core Dev) → label: squad:eecom
    • FIDO (Quality Owner) → label: squad:fido
    • PAO (DevRel) → label: squad:pao
    • CAPCOM (SDK Expert) → label: squad:capcom
    • CONTROL (TypeScript Engineer) → label: squad:control
    • Surgeon (Release Manager) → label: squad:surgeon
    • Booster (CI/CD Engineer) → label: squad:booster
    • GNC (Node.js Runtime) → label: squad:gnc
    • Network (Distribution) → label: squad:network
    • RETRO (Security) → label: squad:retro
    • INCO (CLI UX & Visual Design) → label: squad:inco
    • GUIDO (VS Code Extension) → label: squad:guido
    • Telemetry (Aspire & Observability) → label: squad:telemetry
    • VOX (REPL & Interactive Shell) → label: squad:vox
    • DSKY (TUI Engineer) → label: squad:dsky
    • Sims (E2E Test Engineer) → label: squad:sims
    • Handbook (SDK Usability) → label: squad:handbook
    • Ralph (Work Monitor) → label: squad:ralph
    • @copilot (Coding Agent) → label: squad:copilot

    To reassign, remove the current squad:* label and add the correct one.

  2. bradygaster commented on Mar 15, 2026

    @bradygaster
    Collaborator

    Analysis: Transient API Error on Ubuntu WSL

    Hi @matheuszhs, thanks for reporting this. I've investigated our codebase to determine if Squad is contributing to this issue.

    Finding: This is an upstream Copilot CLI/API issue

    The "transient API error" followed by rate limiting is coming from the GitHub Copilot API platform itself, not Squad. Here's what I found:

    1. Squad SDK implements robust retry logic:

      • Exponential backoff with 3 retry attempts (1s → 2s → 4s delays)
      • Automatic reconnection for connection errors (ECONNREFUSED, ECONNRESET, etc.)
      • Rate limit detection with retry-after awareness
      • See: [\�dapter/client.ts:820-880](https://github.com/bradygaster/squad/blob/main/packages/squad-sdk/src/adapter/client.ts#L820-L880)
    2. The error pattern you're seeing suggests:

      • The Copilot API is experiencing instability (transient errors)
      • Repeated retries by Copilot CLI v1.0.4 trigger rate limiting
      • This happens before Squad even gets involved — the error is at the CLI→API layer

    Workarounds to Try:

    1. Wait for the rate limit to clear (1 minute, as the error message says)
    2. Check your network environment:
      • Are you behind a corporate VPN or proxy?
      • WSL networking issues sometimes cause connection instability
      • Try: \curl -I https://api.github.com\ to verify connectivity
    3. Verify your GitHub Copilot auth:
      • Run \gh auth status\ to check if your token is valid
      • Try \gh auth refresh\ to get a fresh token
    4. Check Copilot service status:
      • GitHub Copilot API may be experiencing degraded performance
      • Check GitHub Status

    WSL-Specific Considerations:

    WSL networking can sometimes cause connection issues. Try:

    • \wsl --update\ to ensure you're on the latest WSL version
    • Set
      etworkingMode=mirrored\ in .wslconfig\ (WSL 2.0+)
    • Test with --no-pager\ flags if the issue is with output buffering

    What Squad Does NOT Contribute To:

    ✅ Squad does NOT make excessive API calls during init/spawn
    ✅ Squad does NOT bypass Copilot CLI's rate limiting
    ✅ Squad does NOT modify how Copilot CLI retries transient errors

    The retry loop you're seeing is Copilot CLI's internal behavior, not Squad's. Squad only interacts with the CLI via the @github/copilot-sdk\ adapter after the CLI is already running.

    Recommendation:

    This is a platform/environment issue rather than a Squad bug. I recommend:

    1. Try the workarounds above
    2. If the issue persists, file a report with GitHub Copilot Support (include your WSL version, Ubuntu version, and the full error trace)
    3. Monitor for WSL/Copilot CLI updates that may address connectivity stability

    I'll label this as
    ot-a-bug\ (upstream issue) and
    eeds-docs\ to add troubleshooting guidance for WSL users. Let me know if any of the workarounds help!


    CAPCOM (SDK Expert)

  3. bradygaster commented on Mar 15, 2026

    @bradygaster
    Collaborator

    Update: Attempted to add a
    ot-a-bug\ label but that label doesn't exist in this repo. I've added \ ype:docs\ to track the documentation improvement needed (WSL troubleshooting guide).

    If you'd like to close this issue since it's an upstream platform issue, feel free to do so after trying the workarounds. Otherwise, we can keep it open to track the documentation task.

  4. github-actions commented on Mar 15, 2026

    @github-actions
    Contributor

    🏷️ Issue type updated → type:docs

  5. deleted a comment from github-actions on Mar 15, 2026
  6. deleted a comment from github-actions on Mar 15, 2026
  7. deleted a comment from github-actions on Mar 15, 2026
  8. deleted a comment from github-actions on Mar 15, 2026
  9. matheuszhs commented on Mar 15, 2026

    @matheuszhs
    Author

    @bradygaster thanks for the reply, it was probably an instability with Copilot or the gh CLI

  10. bradygaster commented on Mar 20, 2026

    @bradygaster
    Collaborator

    Thanks for reporting this! This isn't a Squad issue — it's the GitHub Copilot CLI hitting API rate limits. The error message confirms it: you've hit a rate limit.

    What to do:

    • Wait 1-2 minutes and retry (the rate limit resets quickly)
    • If persistent, check your Copilot subscription tier
    • Make sure you're on the latest Copilot CLI version

    This is upstream Copilot behavior, not something Squad can control. Closing — feel free to reopen if you believe there's a Squad-specific angle.

  11. bradygaster commented on Mar 20, 2026

    @bradygaster
    Collaborator

    Closing — this is a Copilot CLI rate limit, not a Squad issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    go:needs-researchNeeds investigationpriority:p1This sprintsquadSquad triage inbox — Lead will assign to a membertype:docsDocumentation work

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions