You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
400 with empty error body when context contains regional-indicator pairs (flag emoji, e.g. ๐น๐ผ)ย #51348
Requests whose conversation context contains regional-indicator symbol pairs (U+1F1E6โU+1F1FF โ e.g. the flag sequence ๐น๐ผ = U+1F1F9 U+1F1FC) are rejected by the opencode.ai/zen/go gateway with HTTP 400 and an empty error body:
{"model":"deepseek-flash"}
(31-byte response family; the error field is absent entirely.) No error.type, no message โ clients can only report "400" with zero diagnostic information.
Reproduction (single-variable mutation test)
Same request body; only the user text differs:
Probe
Content
Result
baseline
Reply with the single word OK.
200 ร7 (interleaved in same window)
๐น๐ผ pair
Reply OK if you can see this flag: ๐น๐ผ
400 ร10
๐ฉ๐ช pair (control)
another flag
200
๐ญ๐ฐ / ๐บ๐ธ / ๐ฏ๐ต (controls)
other flags
200
lone regional indicator
single U+1F1F9
200
ordinary emoji
๐
200
full CJK text, no emoji
ใไบๆดฒใๅฐๆนพๅฎถๅฎฝ02ไธจไธ็บฟ
200
Interleaved timeline against the same gateway in one window: 200 โ 400 400 โฆ โ 200 โ the trigger is the content, not timing or rate.
Endpoint: POST /v1/messages (Anthropic Messages), model deepseek-flash
Context size: 55kโ154k tokens (well under any context limit)
First observed: 2026-09-24 15:59 UTC
Deterministic whenever the code-point sequence is present at this size
This report: a single content variable flips the outcome at ~55โ150k tokens; removing those two code points yields 200 with everything else byte-identical.
Impact
Behind Claude Code auto mode, the permission classifier sends the full conversation context on every tool call. It receives this 400 โ fail-closed โ every file/bash write is blocked for the rest of the session. One content match bricks the session until the context is scrubbed or the model is switched.
Side observation: a different provider (DeepSeek official API) rejects the same content with an explicit 400 Content Exists Risk message โ so upstream content moderation on this sequence is plausible. If zen/go moderates this content too, that is fine โ but please return a descriptive error (standard Anthropic error envelope with type/message) instead of an empty body, so clients can distinguish "content rejected" from "gateway broken".
Ask
Either stop rejecting regional-indicator pairs, or
Return a proper error payload identifying the rejected content class.
Activity
github-actions commentedon Sep 25, 2026
This issue doesn't fully meet our contributing guidelines.
What needs to be fixed:
Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
If you believe this was flagged incorrectly, please let a maintainer know.
github-actions commentedon Sep 25, 2026
This issue has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.
Feel free to open a new issue that follows our issue templates.