fix(proxy): fix two Claude Desktop Windows startup failures#3
Closed
AntonYeromin wants to merge 1 commit into
Closed
fix(proxy): fix two Claude Desktop Windows startup failures#3AntonYeromin wants to merge 1 commit into
AntonYeromin wants to merge 1 commit into
Conversation
- Strip thinking field for claude-desktop agent in ClaudeRequestNormalizerPlugin. Haiku models (claude-haiku-4-5-*) do not support extended thinking. When Desktop 3P mode selects Haiku, the app resolves maxThinkingTokens=31999 and sends thinking:enabled to the API. The API returns thinking content blocks which the Desktop SDK cannot parse as text blocks, resulting in: "API Error: Content block is not a text block". Fix: add 'claude-desktop' to ALLOWED_AGENTS so the existing Haiku thinking- strip logic runs for Desktop proxy requests, same as for codemie-claude. - Rename MCP server "Atlassian Jira and Confluence" → "Atlassian-Jira-and-Confluence". Claude Code validates allowedMcpServers names against /^[a-zA-Z0-9_-]+$/. Spaces in the name caused the managed-policy settings load to fail on Windows with "Server name can only contain letters, numbers, hyphens, and underscores", crashing the session before it could start. Generated with AI Co-Authored-By: codemie-ai <codemie.ai@gmail.com>
Owner
Author
|
Closing — opening PR against upstream codemie-ai/codemie-code instead. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two separate Windows-only bugs that prevented Claude Desktop (3P mode) from starting successfully when certain conditions were met.
Changes
1. Haiku model crash —
Content block is not a text blockRoot cause: When the user selects
claude-haiku-4-5-20251001in Claude Desktop, the app resolvesmaxThinkingTokens = 31999and sendsthinking: { type: "enabled", budget_tokens: 31999 }to the API via the CodeMie proxy. Haiku returns thinking content blocks in the response stream. The Desktop SDK, expecting only text blocks, throws:The SSO proxy already had a
ClaudeRequestNormalizerPluginthat strips thethinkingfield for Haiku models — but it was scoped only tocodemie-claude(Claude Code). Desktop 3P requests carryclientType: 'claude-desktop'and were silently bypassing the plugin.Fix: Added
'claude-desktop'toALLOWED_AGENTSinClaudeRequestNormalizerPluginso the Haiku thinking-strip logic runs for Desktop proxy requests as well.2. Session crash on startup —
Server name can only contain letters, numbers, hyphens, and underscoresRoot cause: The managed MCP server entry
"Atlassian Jira and Confluence"contained spaces. Claude Code validatesallowedMcpServersnames against/^[a-zA-Z0-9_-]+$/. On Windows, loading the managed-policy settings file failed with:This caused the Claude Code process to exit with code 1 before the session could start.
Fix: Renamed the entry to
"Atlassian-Jira-and-Confluence"(spaces → hyphens).Test Plan
ClaudeRequestNormalizerPluginupdated — new cases coverclaude-desktopagent scoping and Haiku stripping via Desktop agentnpm run test:unit)tsc --noEmit)Checklist