You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Copilot CLI should retry on transient CAPIError 400 Bad Request during agentic workflow execution #25313
When running the Copilot CLI inside a gh-aw agentic workflow, the CLI fails with a non-retried CAPIError: 400 Bad Request from the Copilot inference API (CAPI) mid-session. The CLI (or the gh-aw execution wrapper) should implement retry logic for transient 400 errors that occur after the session has already completed successful turns.
Execution failed: CAPIError: 400 400 Bad Request
(Request ID: C818:3ED713:19D401B:1C446B7:69D653CA)
The CLI had been running normally for ~3.5 minutes — completing 8+ tool calls (reading files, listing issues, exploring the codebase) — when CAPI returned this 400 error. The CLI exited with code 1, failing the workflow.
Expected Behavior
A 400 that occurs mid-conversation (after multiple successful inference turns) is likely transient rather than a genuinely malformed request. The CLI should:
Detect CAPIError: 400 during an active session (after at least one successful turn)
Retry the failed inference request with exponential backoff (e.g., 3-5 attempts)
Only fail the session if retries are exhausted
Context
The conclusion job confirmed Inference access error: false — this was not an auth issue
No code changes were produced (+0 -0), so the entire premium request was wasted
The workflow auto-created issue octodemo/octocat_supply-glorious-meme#33 to track the failure
@copilot create a JavaScript driver to run copilot with an outer that handles this kind of error and retries with the resume flag.
The drivers passes all the arguments to the copilot sub process, transparently standard io streams. Recovers from transient errors.
Activity
pelikhan commentedon Apr 8, 2026
@copilot create a JavaScript driver to run copilot with an outer that handles this kind of error and retries with the resume flag.
The drivers passes all the arguments to the copilot sub process, transparently standard io streams. Recovers from transient errors.
pelikhan commentedon Apr 8, 2026
The agentic engine interface should have a function that provides an optional JavaScript driver.
Update community contributions in README