Skip to content

copilot harness: --continue retry reproduces same 400 'Expected an ID that begins with fc' error on every attempt, exhausting all retries #65756

Closed

Description

@laysa-enmacc

Summary

When the Copilot engine's gh-aw harness hits a 400 error from the model API caused by a malformed tool-call ID mid-conversation, it classifies this as partial_execution and retries via copilot --resume=<id> --continue. Because the retry resumes the same conversation/session state, the malformed tool-call ID is still present, so every subsequent retry attempt fails with the identical 400 error — exhausting all configured retries (default 4 attempts) without ever recovering, even though the underlying cause is not transient.

Observed error (from copilot-harness attempt logs):

400 Invalid 'input[61].id': 'ctc_call_WcucFu1zMaJJNQNn1Y6ioyx6'. Expected an ID that begins with 'fc'.

The ctc_call_... ID format doesn't match what the backend expects (fc... prefix), suggesting a tool-call ID generated by one code path/model and validated against a different (incompatible) schema on resume.

Reproduction context

  • Workflow: Copilot engine, copilot-harness.cjs, default harness retry policy (max-retries=3, i.e. 4 total attempts).
  • Attempt 1 ran for ~108s, made real progress (wrote files, edited code), then hit the 400 error and was classified failureClass=partial_execution (not isHTTP400ResponseError/isCAPIError400, both false, so this specific 400 shape isn't being detected as a distinct error class).
  • Attempts 2-4 each resumed via --continue and failed within ~2s with the exact same error text (same ctc_call_... ID), confirming the retry doesn't clear the poisoned conversation state.
  • All 4 attempts exhausted (retriesRemaining=0), job failed.

Run for reference (private org repo, logs available to maintainers on request): enmaccGmbH/enmacc-url-shortener run 37262769882, job implement / agent.

Suggested fix direction

  • Detect this specific 400 shape (tool-call ID prefix/schema mismatch) as its own failure class (e.g. isToolCallIdSchemaError), distinct from generic partial_execution.
  • For that failure class, don't retry with --continue (which inherits the broken state) — either fail fast, or retry with a fresh session (no --resume) if the caller's safe-outputs config tolerates starting over.

Environment: gh-aw-managed reusable workflow (Copilot engine), observed 2026-10-05.

Activity

  1. locked and limited conversation to collaborators on Oct 5, 2026
  2. unlocked this conversation on Oct 5, 2026
  3. laysa-enmacc commented on Oct 5, 2026

    @laysa-enmacc
    Author

    Additional confirmation: reproduced this identically across 3 separate, fully independent fresh sessions (no shared state, different issue/PR workflow invocations), each time after the agent made real progress (60-110s of work, multiple file edits) then hit the same 400 tool-call-ID-prefix mismatch:

    400 Invalid 'input[48].id': 'ctc_call_Ya1711zmNwpkK8R3bxh1LWAO'. Expected an ID that begins with 'fc'.
    400 Invalid 'input[61].id': 'ctc_call_WcucFu1zMaJJNQNn1Y6ioyx6'. Expected an ID that begins with 'fc'.
    

    Each fresh session then exhausts all 4 --continue retry attempts identically (same error, same malformed ID, since --continue resumes the same poisoned conversation). This rules out transient infra flakiness - it's a deterministic bug that reproduces reliably once the conversation reaches a certain point (looks correlated with volume/pattern of tool calls in one session - this workflow does substantial file writing: 7 test files + edits). Confirms the suggested fix direction: this failure class needs its own detection + a non---continue (fresh session) retry path, since --continue can never recover from it.

  4. locked and limited conversation to collaborators on Oct 5, 2026
  5. unlocked this conversation on Oct 5, 2026
  6. laysa-enmacc commented on Oct 5, 2026

    @laysa-enmacc
    Author

    Root cause pinpointed: regression correlates exactly with a Copilot CLI version bump in the compat matrix

    Tracing this further: install_copilot_cli.sh doesn't pin a Copilot CLI version in the workflow run itself — it resolves the version at runtime from the live .github/aw/compat.json in github/gh-aw-actions@main, installing the max-agent version allowed for the caller's compiled gh-aw version.

    For our compiled version (v0.89.21, which falls in the min-gh-aw: 0.72.0, max-gh-aw: * window), git log on that file shows:

    8a5b99b 2026-10-02 18:36:34 -0700  max-agent: 1.0.89 -> 1.0.90   (chore: sync actions from [email protected], #255)
    7c1d4b7 2026-09-30 10:17:04 -0700  max-agent: 1.0.87 -> 1.0.89   (#254)
    

    Our last confirmed clean run of this workflow was Oct 2 (before the 01:36 UTC Oct 3 bump). Every failing run since (reproduced 3x independently, see above) installed Copilot CLI 1.0.90, two patch versions ahead of what's recorded as the 'last known good' version (1.0.87) in our own lock-file metadata.

    This strongly suggests the malformed tool-call ID format (ctc_call_... instead of fc...) was introduced or newly exposed in Copilot CLI 1.0.88/1.0.89/1.0.90, and that the harness's generic partial_execution + --continue retry path doesn't handle it. Flagging in case it's useful for triage — happy to test against a pinned older Copilot CLI version if that's a viable workaround while a fix is prepared.

  7. locked and limited conversation to collaborators on Oct 5, 2026
  8. unlocked this conversation on Oct 5, 2026
  9. laysa-enmacc commented on Oct 5, 2026

    @laysa-enmacc
    Author

    Critical update: bug reproduces identically on Copilot CLI 1.0.87 — rules out the version-bump theory

    We pinned engine.version: "1.0.87" (the version recorded as last-known-good in our lock-file metadata, predating the compat.json max-agent bump to 1.0.90 covered in my last comment) and re-ran the workflow.

    Confirmed 1.0.87 was actually installed:

    Resolved copilot binary: /opt/hostedtoolcache/copilot-cli/1.0.87/x64/bin/copilot
    

    Same error, byte-for-byte format, on all 4 retry attempts:

    400 Invalid 'input[56].id': 'ctc_call_8tYxoP9J3nHSF0ayXgqiOeSE'. Expected an ID that begins with 'fc'.
    [copilot-harness] attempt 1 failed: exitCode=1 failureClass=partial_execution ... isHTTP400ResponseError=false isNullTypeToolCallError=false ...
    [copilot-harness] attempt 1: partial execution — will retry with --continue (attempt 2/4)
    ... (identical on attempts 2, 3, 4, same tool-call ID, same 400 message) ...
    [copilot-harness] all 3 retries exhausted — giving up (exitCode=1)
    

    This means pinning the CLI version does not fix the issue — the malformed ctc_call_... tool-call ID is very likely generated server-side by the model/inference backend for gpt-5.3-codex, not by the local CLI binary. The CLI version is probably not the relevant variable at all; something changed on the backend side for this model between our last known-good run (Oct 2) and now.

    This doesn't change the other part of the ask (the harness retrying via --continue resumes the same poisoned state and can never succeed once this 400 occurs), but it does redirect where the actual fix likely needs to happen — possibly in the gpt-5.3-codex backend's tool-call-ID generation, rather than (or in addition to) the harness retry logic. Flagging in case this points the investigation in a more useful direction.

  10. locked and limited conversation to collaborators on Oct 5, 2026
  11. unlocked this conversation on Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions