[BUG] Claude Code should generate a new guid instead of getting from the model

Resolved 💬 2 comments Opened Feb 5, 2026 by Caleb-KS Closed Mar 5, 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?

When writing code, sometimes the code has a GUID (globally unique identifier). This happens in .sln files for projects, and for COM interfaces, etc.

But, it seems when writing code, a guid comes from the model as part of the code.

This should never happen because the statistics break the concept of a globally (like in the universe, for all time) unique identifier. Statistically, the GUID from the model depends on the tokens around it, which if it's outputting tokens that are similar to some existing code (either in the model or in the current codebase), likely you'll get the same guid as something else.

What Should Happen?

Claude should ALWAYS use some system-acceptable way of generating GUIDs. .NET, Python, Powershell, have ways of generating a GUID that should actually be unique (based on current hardware, MAC address, current time, etc.).

I added a /memory to ALWAYS use Powershell to generate a new GUID when writing code that needs a guid. So far, it seems to be following my guidance.

Error Messages/Logs

Steps to Reproduce

Have claude create any code that requires a GUID in it somewhere.

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.29

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

_No response_

View original on GitHub ↗

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