[BUG] Cowork omits anthropic-workspace-id header on custom gateway (Code works)

Resolved 💬 2 comments Opened Jun 1, 2026 by songhuangtw Closed Jul 4, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

On the Claude for Windows desktop app, the "Cowork" surface fails on every message
with: API Error: 400 Missing 'anthropic-workspace-id' header.

The "Code" surface in the SAME app, against the SAME custom gateway, works perfectly.

We use a custom API gateway (AWS-hosted, Anthropic-API protocol) that REQUIRES the
anthropic-workspace-id header on every request. Code attaches this header and
succeeds; Cowork does not attach it and is rejected with 400. Cowork appears not to
propagate the provider's configured custom headers (specifically
anthropic-workspace-id) to its own API requests.

What Should Happen?

Cowork should attach the same provider-configured custom headers (including
anthropic-workspace-id) as the Code surface does, so that requests to a custom
gateway that mandates that header succeed. Cowork should be usable whenever Code
is usable against the same provider.

Error Messages/Logs

API Error: 400 Missing 'anthropic-workspace-id' header.

# Host app injects these into the Claude Code subprocess env (NOT persistent User/Machine vars):
ANTHROPIC_BASE_URL       = https://aws-external-anthropic.ap-northeast-1.api.aws
ANTHROPIC_AUTH_TOKEN     = <redacted credential>
ANTHROPIC_CUSTOM_HEADERS = anthropic-workspace-id: wrkspc_***REDACTED***
                           anthropic-version: 2023-06-01

# Code honors ANTHROPIC_CUSTOM_HEADERS -> sends workspace-id -> 200 OK
# Cowork uses same base URL + auth token but omits workspace-id -> 400

Steps to Reproduce

  1. Configure the desktop app to use a custom provider/gateway that mandates the

anthropic-workspace-id header (here: an AWS-hosted Anthropic-API endpoint,
shown in-app as provider "Gateway").

  1. Open the "Code" surface, send any prompt -> works (200 OK).
  2. Switch to the "Cowork" surface, send any message.
  3. Every message immediately fails with:

API Error: 400 Missing 'anthropic-workspace-id' header.

Claude Model

Opus

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.1.156 (embedded in Claude for Windows; Agent SDK 0.3.156)

Platform

Other

Operating System

Windows

Terminal/Shell

Other

Additional Information

This is NOT the Claude Code CLI in a terminal — it is the "Cowork" surface inside
the Claude for Windows desktop app. Using this template as the closest official
channel.

Versions:

  • Claude for Windows desktop app: v1.9659.2
  • Embedded Claude Code: 2.1.156
  • Agent SDK: 0.3.156
  • Entrypoint: claude-desktop-3p

Platform detail: the gateway is AWS-hosted at
https://aws-external-anthropic.ap-northeast-1.api.aws and speaks the Anthropic API
protocol (uses anthropic-version: 2023-06-01 and requires anthropic-workspace-id),
so it is not standard AWS Bedrock — hence "Other" selected above.

Analysis: the host app already knows the workspace-id (it injects it into the Code
subprocess via ANTHROPIC_CUSTOM_HEADERS), so this looks like Cowork failing to
propagate configured provider custom headers to its own requests, rather than a
missing user setting. Auth token redacted; exact workspace-id can be provided
privately if useful.

(Screenshot of the in-app 400 error available.)

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗