diff --git a/server/internal/assistant/claude.go b/server/internal/assistant/claude.go index 0cd2210..86f9663 100644 --- a/server/internal/assistant/claude.go +++ b/server/internal/assistant/claude.go @@ -295,7 +295,10 @@ func (c *Client) workspace() string { // a 400 buried in a log, while the user just sees "something went wrong at our // end" - which is true and useless. func NeedsWorkspace(err error) bool { - return err != nil && strings.Contains(err.Error(), "anthropic-workspace-id is required") + // The API has worded this two ways so far: "anthropic-workspace-id is + // required" and "must include the anthropic-workspace-id header". Match + // the header name, which is the part that will not be reworded. + return err != nil && strings.Contains(err.Error(), "anthropic-workspace-id") } func (c *Client) modelID() string {