BUG: String should match pattern '^[a-zA-Z0-9_-]{1,128} on every claude model request
Describe the bug
2025-11-03T14:59:56.654Z [INFO] [log_3ef8dc, x-request-id: "00000-ef1ba264-5fed-477a-8ff4-fb0da1aee92e"] post https://api.individual.githubcopilot.com/chat/completions failed with status 400 in 520ms - error; not retryable
2025-11-03T14:59:56.656Z [ERROR] error (Request-ID CB74:212EB7:1CB5D38:21081A2:6908C365)
2025-11-03T14:59:56.656Z [ERROR] {
"stack": "CAPIError: 400 tools.8.custom.name: String should match pattern '^[a-zA-Z0-9_-]{1,128}$'\n at t.fromAPIError (file:///C:/Users/cheat/AppData/Roaming/npm/node_modules/@github/copilot/index.js:1905:898)\n at J1e.getCompletionWithTools (file:///C:/Users/cheat/AppData/Roaming/npm/node_modules/@github/copilot/index.js:1905:5284)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async Ude.getCompletionWithTools (file:///C:/Users/cheat/AppData/Roaming/npm/node_modules/@github/copilot/index.js:1906:1431)\n at async Bil (file:///C:/Users/cheat/AppData/Roaming/npm/node_modules/@github/copilot/index.js:2456:573)\n at async t.getCompletionWithTools (file:///C:/Users/cheat/AppData/Roaming/npm/node_modules/@github/copilot/index.js:2460:58389)\n at async z7n (file:///C:/Users/cheat/AppData/Roaming/npm/node_modules/@github/copilot/index.js:2486:19713)\n at async epl (file:///C:/Users/cheat/AppData/Roaming/npm/node_modules/@github/copilot/index.js:2486:16987)",
"message": "400 tools.8.custom.name: String should match pattern '^[a-zA-Z0-9_-]{1,128}$'",
"status": 400,
"headers": {},
"requestID": "00000-ef1ba264-5fed-477a-8ff4-fb0da1aee92e",
"error": {
"message": "tools.8.custom.name: String should match pattern '^[a-zA-Z0-9_-]{1,128}$'",
"code": "invalid_request_body"
},
"code": "invalid_request_body",
"request_id": "00000-ef1ba264-5fed-477a-8ff4-fb0da1aee92e",
"ghRequestId": "CB74:212EB7:1CB5D38:21081A2:6908C365",
"name": "CAPIError"
}
``
Affected version
0.0.353 Commit: f8fd3e3
Steps to reproduce the behavior
I create any prompt that requires to use claude and I get the same repeated responses until it times out and logs only show the details from above over and over again with nothing else in the log showing any issues that may cause this
Expected behavior
That claude model requests don't get rejected constantly
Additional context
No response
Could you try upgrading to 0.0.354 (just released a few moments ago) and see if this still is an issue? We made some changes recently that might have solved this (we had problems where if a custom agent name contained characteres outside this range ([a-zA-Z0-9_-]{1,128}, and we now normalize these names). If you're still seeing an issue on 0.0.354, I'd like to dig in more and understand exactly what tool name we are running afoul with.