Bug: Agent SDK code generation fails when Agent name includes Japanese characters

:bug: Description

I found a reproducible bug in the OpenAI Agent Builder (recently released with Agent Kit / SDK integration).

When creating an Agent and setting its Name field to Japanese (e.g., "テストエージェント"), the UI works fine.
However, when I try to generate the Agents SDK code, it fails with the following error messages:

Failed to generate code
Variable not found for node node_nnf56d0b with suffix null

:gear: Step to Reproduce

  1. Go to the Agent Builder page on platform.openai.com/agents.
  2. Create a new Agent.
  3. Set the Name of the Agent to a Japanese string, e.g. テストエージェント.
  4. Click on “Code” (or equivalent button to generate code for the Agent) and select Agents SDK tab
  5. Observe that an error occurs instead of generating the code.

:puzzle_piece: Expected Behavior

Either of the following should be implemented:

  1. The SDK code should be generated successfully even when the Agent’s name includes non-ASCII (e.g., Japanese) characters, or

  2. The Agent Builder should prevent invalid characters at input time and display a clear message such as “Agent names must be in English.”

Currently, the system accepts Japanese input but fails later during code generation, which creates confusion.

:collision: Actual Behavior:

  • Code generation fails only when the Agent’s name contains Japanese characters.

  • Works correctly if the name is in English.

This post was written with the help of ChatGPT (AI assistant) to clearly describe the issue in English.