mirror of
https://github.com/jwadow/kiro-gateway.git
synced 2026-04-25 09:25:50 +03:00
[GH-ISSUE #3] Error in sandbox mode in Claude Code #3
Labels
No labels
bug
bug
enhancement
enhancement
fixed
fixed
invalid
needs-info
needs-testing
pull-request
question
upstream
wontfix
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/kiro-gateway-jwadow#3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @lonestike on GitHub (Dec 14, 2025).
Original GitHub issue: https://github.com/jwadow/kiro-gateway/issues/3
Originally assigned to: @jwadow on GitHub.
working with Claude Code router, I have this error when running in sandbox mode (working fine in normal mode)
in Claude Code:
log of the python file:
@zeroaddresss commented on GitHub (Dec 14, 2025):
how do you use it with claude code? @lonestike @jwadow
@lonestike commented on GitHub (Dec 14, 2025):
you use claude code router to redirect the model used in claude code to the url provided by this project
@jwadow commented on GitHub (Dec 14, 2025):
thanks for feedback.
i'm not familiar with "sandbox mode" in ccr. i installed it for the first time about 10 minutes ago, maybe I don’t know something.
what is it and how to enable it?
@lonestike commented on GitHub (Dec 14, 2025):
ccr doesn't change anything for Claude Code, it's just to route the queries from Claude Code to other urls (the great thing is that it leverages the usage of Claude Code with other models)
so when you are using Claude Code, you call
/sandboxand it allows filesystem and network isolationhttps://code.claude.com/docs/en/sandboxing
@zeroaddresss commented on GitHub (Dec 14, 2025):
can you please attach a minimal
~/.claude-code-router/config.jsonexample to use Opus 4.5 via proxy?i'm missing something and traffic is not being redirected correctly. thanks in advance
@lonestike commented on GitHub (Dec 14, 2025):
of course, this should do it
@jwadow commented on GitHub (Dec 14, 2025):
How do you get around your "Improperly formed request" error? Is it constant or occasional?
In my case chat and tools working.
I tried:
@lonestike commented on GitHub (Dec 14, 2025):
no I have it every time
Claude Code v2.0.69
and it works again as soon as sandbox is disabled
@jwadow commented on GitHub (Dec 14, 2025):
Unfortunately, this isn't relevant to the project; it's about third-party app settings. I could, of course, but then I'd have to add guides for a bunch of other programs. Basically, you can search for it on Google; the main thing is to specify the correct ip:port of kiro gateway
@jwadow commented on GitHub (Dec 14, 2025):
I can't reproduce the error. Maybe you have custom tools or prompt or something?
I need this from you:
.env:Restart gateway
When error occurs:
kiro_request_body.jsonandrequest_body.jsonI might be able to find and fix it, but I can't promise anything. The process might be iterative, since I can't reproduce the error.
@lonestike commented on GitHub (Dec 15, 2025):
yes, here are the files
kiro_request_body.json
request_body.json
@jwadow commented on GitHub (Dec 15, 2025):
I took the most direct approach - I simply sent your entire request to the gateway; there was no error. This means you have:
TOOL_DESCRIPTION_MAX_LENGTHparameter in.envto something higher than 10000 (just delete this line in.env)The situation seems mystical (there's no such thing as magic). My Claude Code Router works with any settings, and even your broken request works perfectly. This means the problem is with your Kiro Gateway; I have no other explanation.
@jwadow commented on GitHub (Dec 17, 2025):
@lonestike Hey! Just released v1.0.4 which fixes a bug with tool_calls being lost during message merging.
This might fix your sandbox mode issue — when Claude Code sends multiple assistant messages with tool_calls consecutively, the gateway was losing some of them, causing
{"message":"Improperly formed request.","reason":null}.Worth trying:
New debugging feature — if it still fails, use:
Let me know if it helps! If not, attach the debug files, i'll reopen issue and we'll investigate further.