Skip to content

Copilot Chat fails with 413 after viewing and comparing 3 local workspace images with GPT-5.4 or GPT-5.4 mini models #4856

@josephtingiris

Description

@josephtingiris

Summary

Copilot Chat reliably fails with:

413 {"error":{"message":"failed to parse request","code":""}}

The failure appears after Copilot views and compares multiple local images from the workspace using the currently available GPT-5.3-Codex, GPT-5.4, and GPT-5.4 mini models.

Text-only planning with the same surrounding context is stable.

This does not appear to be caused by @ in file paths, markdown file contents, or basic git-state inspection.

Reproducibility

Reproducible

Environment

  • VS Code remote environment on Linux
  • Copilot Chat in VS Code
  • Workspace contains a Next.js app under a folder literally named @/
  • Local images are under @/public/images/

What I tested

Stable flows

These did not reproduce the failure:

  • Reading #file:@-crafting.md
  • Reading #file:AGENTS.md
  • Text-only planning based on those files
  • Git-only planning/edit flow without image preview
  • Narrow planning and editing in the @/ app without opening images

Failing flow

This prompt reliably reproduces the problem in a fresh chat:

Open and compare 3 candidate images from @/public/images for homepage background and hero selection. Do not inspect git state and do not scan the rest of @/.

Observed runtime sequence before failure:

  • Selecting
  • After Clarifying
  • Viewed image (3 times)
  • Processing
  • Crash with 413 failed to parse request

Expected behavior

Copilot should either:

  • complete the image comparison normally, or
  • gracefully reduce context or refuse extra image context with a user-readable limit message

It should not fail with a generic 413 failed to parse request.

Actual behavior

After viewing three local images, Copilot fails during processing with:

Sorry, your request failed. Please try again.

Reason: Request Failed: 413 {"error":{"message":"failed to parse request","code":""}}

Example request IDs from reproduced failures:

  • Copilot Request id: 9f38a62f-ddda-41e6-a3b4-5af0afa54624
  • GH Request Id: 9836:1431EE:B408DE:D53052:69CB4D12
  • Copilot Request id: d8a7672a-4f82-46ae-ab69-50b0a62c2720
  • GH Request Id: 921C:71F9F:DCF501:1063B4B:69CB4760

Notes

I initially suspected one of the following, but testing argues against them as the primary cause:

  • @ in folder or file names
  • markdown file contents in @-crafting.md or AGENTS.md
  • proceed continuation by itself
  • git-state inspection by itself

The strongest current hypothesis is that the issue is in multimodal image-context packaging or reserialization after multiple local image views.

Additional observations

  • A broader planning prompt over the whole @/ subtree could also trigger related failures, but the cleanest repro is now the 3-image comparison flow.
  • A Git-only, no-image-preview version of the workflow got much further and successfully planned and edited without crashing.
  • This suggests the failure threshold is specifically tied to local image viewing and subsequent processing.

Impact

This blocks normal design iteration in repositories that use local image assets, because asking Copilot to compare several candidate images can terminate the session instead of completing the task.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions