Claude Opus inserting spaces after decimals in variables #180736
Replies: 15 comments 2 replies
-
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
-
|
I can confirm I just had this happen in 6 places in a single GitHub action workflow file I had Claude Opus 4.5 modify from the GitHub web page. It took lines like this:
And gave me back this, with no other changes to this line except the new space after
|
Beta Was this translation helpful? Give feedback.
-
|
This has been happening since Mon, I thought it is an issue with the editor:
Look at this diff |
Beta Was this translation helpful? Give feedback.
-
|
this is still there, even in chats:
|
Beta Was this translation helpful? Give feedback.
-
|
This is incredibly frustrating. It happens on github in browser, in app, and in vscode with Claude Opus 4.5. It happened as recent as moments before I posted this reply. |
Beta Was this translation helpful? Give feedback.
-
|
this is incredibly frustrating and isn't limited to Claude. It is as though Copilot is treating periods as grammar vs code. I am having to manually check each piece of code with search and replace. |
Beta Was this translation helpful? Give feedback.
-
🐛 Fixing Space After Decimals in Claude Opus (Copilot) OutputThis document addresses the issue where the Claude Opus model, when accessed through the GitHub Copilot interface, incorrectly inserts a space after the decimal point in floating-point numbers (e.g., rendering 1. 🔍 Diagnosis of the ProblemThe issue is likely not a bug in the Claude Opus model itself, but rather a tokenization or rendering error introduced by the GitHub Copilot integration layer when processing Claude's output.
2. 🛠️ Workaround: Manual CorrectionSince the issue is external to the model's logic, the immediate solution is manual cleanup using editor features. A. Find and ReplaceUse your IDE's global or file-specific Find and Replace feature.
B. Use Code FormattersIf you are generating configuration files or code in a language with strict formatting rules (e.g., Python, JavaScript, C++), running a dedicated code formatter (like Prettier, Black, or clang-format) immediately after generation may resolve the issue, as these tools prioritize strict syntax. 3. 📢 Providing Effective FeedbackAs this is an integration/rendering bug, the most critical step is providing detailed, specific feedback to the GitHub Copilot team. A. Report the Bug via GitHub/IDE
B. Mention the Tokens
|
Beta Was this translation helpful? Give feedback.
-
|
I am also experiencing this, and it's a big problem |
Beta Was this translation helpful? Give feedback.
-
|
Same problem. It used to work fine, now feels like all generated code has a space after each dots, and the code is not usable. It is not an option for me to replace those manually each time. |
Beta Was this translation helpful? Give feedback.
-
|
Same problem. "Qwen2.5-VL-7B-Instruct. mmproj-F16.gguf" |
Beta Was this translation helpful? Give feedback.
-
|
I found out that the pb. comes from Github. Possible solutions |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
This has been going on in Copilot for the latest versions (4.5) of the top two models from Anthropic (Sonnet, Opus) since the day they were included in Copilot. The only workaround I have found so far is to use OpenAI's cheapest coding model i.e. GPT-4.1 to "clean the redundant spaces, occurring mostly after punctuation marks (including in strings and comments)". Please note that an affected model cannot be used for this cleanup - it sees the problem, attempts to fix it, but fails to do so. |
Beta Was this translation helpful? Give feedback.
-
|
Let's escalate this to Github Issues visited by Anthropic devs, who are the only people interested that these models continue to be used, (Microsoft's Copilot team has hedged their bets with all other major model providers:), like I did here: Feel free to do the same if you find anything remotely similar :) |
Beta Was this translation helpful? Give feedback.
-
|
I, too, have been experiencing this issue, and it is incredibly frustrating. It is definitely a CoPilot UI issue as it renders the output from Claude and others. The problem is that CoPilot is treating the code as a text document and thinks it is a punctuation point, and therefore adds a space after (albeit inconsistently). My workaround has been to copy the code into Notepad++ and do a find . and replace all . It works the about 99% of the time, the only time it hasn't worked for me is when there is . - which has happened, but less frequently. |
Beta Was this translation helpful? Give feedback.




Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Bug
Copilot Feature Area
Copilot in GitHub
Body
When Claude Opus 4.5 on Copilot generates code, it's irregularly inserting a space after decimals in variables and equations. Something might have a default value of 1.000, and the system is rendering it as 1. 000.
I tested this directly in Claude on the Claude.ai site and didn't encounter the problem. When I asked the version working with Copilot to correct the issue, it couldn't see the problem. There seems to be a problem with how Copilot is rendering the Claude output here.
Beta Was this translation helpful? Give feedback.
All reactions