Skip to content

Claude agent host: native (Anthropic-auth) models hardcode supportsVision:false, so image paste is rejected #337631

Closed as not planned

Description

Does this issue occur when all extensions are disabled?

Yes. The cause is in the agent host itself (out/vs/platform/agentHost/node/agentHostMain.js), not in an extension.

  • VS Code Version: 1.138.0, still reproduces on 1.139.0 (latest stable)
  • OS Version: macOS 27.0 (arm64)
  • Harness: Claude agent host, authenticated natively with CLAUDE_CODE_OAUTH_TOKEN (Claude Max subscription), not Copilot-routed

Steps to reproduce

  1. Authenticate the Claude harness with Anthropic credentials (CLAUDE_CODE_OAUTH_TOKEN from claude setup-token, or ANTHROPIC_API_KEY), as described in https://code.visualstudio.com/docs/agents/run/agent-harnesses.
  2. Start a Claude session and pick any native model (Opus, Sonnet, Haiku, Fable).
  3. Paste an image into the chat input.

Expected: the image is attached. All current Claude models accept images.

Actual: the attachment is struck through with the hover text "Opus does not support images." The same happens for every native Claude model.

Cause

Native Claude models are mapped with vision hardcoded off. In the 1.138 build, the model mapper called from _fetchNativeModels() (1.139 has the same code, minified as name:r.displayName,supportsVision:!1):

function fce(i,n){let e=(i.supportedEffortLevels??[]).filter(hD),t=yD(e);
  return{provider:n,id:i.value,name:i.displayName,supportsVision:!1,...t?{configSchema:t}:{}}}

Copilot-routed models read vision from Copilot's capability data (supportsVision:!!s.capabilities?.supports?.vision), so Claude through Copilot accepts images while the same models through native auth do not.

Confirmation

Changing supportsVision:!1 to supportsVision:!0 in that mapper and restarting VS Code fixes it: the paste is accepted, the image reaches the session (the model opens it with the Read tool as Pasted Image.png), and Opus describes the screenshot content correctly.

Suggested fix

Set supportsVision: true for native Claude models, or derive it from the model family, since the SDK's supportedModels() result does not carry a vision flag.

Related but different: #293474 (closed) covered images in Copilot-routed Claude mode, before native auth existed (#323037).

Activity

  1. vs-code-engineering commented on Sep 24, 2026

    @vs-code-engineering
    Contributor

    Thanks for creating this issue! It looks like you may be using an old version of VS Code; the latest stable release is 1.139.0. Please try upgrading to the latest version and checking whether this issue remains.

    Happy Coding!

  2. romanrokon commented on Sep 24, 2026

    @romanrokon
    Author

    Still reproduces on 1.139.0 (latest stable). The native-model mapper in out/vs/platform/agentHost/node/agentHostMain.js still has name:r.displayName,supportsVision:!1; pasting an image into a native Claude session shows " does not support images." Flipping it to !0 fixes it again. Description updated with the version.

  3. romanrokon commented on Sep 25, 2026

    @romanrokon
    Author

    Duplicate of #331347 (fix in #331396), which I missed when searching. It still reproduces on 1.139.0: the native-model mapper has supportsVision:false, and flipping it to true makes pasted images work, which matches what #331396 does. Closing in favour of #331347.

  4. locked and limited conversation to collaborators on Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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