[BUG] Prompt suggestions are silently dropped for Persian (non-Latin) users: output filters are English/CJK-only

Status Open
Reported on v2.1.284
Maintainer reply None cached
Activity 0 comments · opened Oct 7, 2026

Preflight Checklist

  • [x] I have searched existing issues and this is not a duplicate
  • [x] I am on the latest version of Claude Code (2.1.284, bundled with Claude Desktop 2.19675.0)
  • [x] This is a bug report, not a feature request

What's Wrong?

For a Persian-speaking user the "suggested next prompt" almost never appears, even though the whole pipeline works:
the desktop requests suggestions, the CLI fires the prompt_suggestion fork after every warm turn, and the model
returns a suggestion. The suggestion is then discarded by the post-generation output filter, whose rules were written
for English (plus CJK) only:

  1. too_few_words: a single-word suggestion is kept only if it is in a hard-coded English whitelist

(yes, yeah, yep, ok, okay, push, commit, deploy, stop, continue, check, exit, quit, no, ...). The generation prompt
tells the model to suggest "yes" / "go ahead" when Claude asks whether to continue, and to "match the user's style".
For a Persian user that produces «بله» / «آره» / «باشه» / «ادامه», which are never whitelisted, so every
confirmation-type suggestion (the most common case) is dropped.

  1. too_many_words (> 12 whitespace-separated words) and too_long (>= 100 UTF-16 code units). Persian suggestions

produced in large-context sessions regularly hit these limits (see case C).

  1. evaluative, claude_voice, meta_text, prefixed_label, multiple_sentences patterns only cover Latin and

CJK scripts, so they neither help nor hurt here, but they show the filter was never localized.

Nothing in the UI or logs tells the user why a suggestion did not appear; the only trace is the internal
tengu_prompt_suggestion telemetry event (outcome=suppressed, reason=too_few_words etc.), which the user cannot see.

["too_few_words",()=>{if(o>=2)return!1;if(e.startsWith("/"))return!1;let r=E(e);if(r>0)return r<2;
  return!new Set(["yes","yeah","yep","yea","yup","sure","ok","okay","push","commit","deploy","stop","continue","check","exit","quit","no"]).has(t)}],
["too_many_words",()=>o>12],
["too_long",()=>e.length>=100],

E(e) counts CJK characters only; every other script falls through to the English whitelist.

What Should Happen?

A valid, user-style suggestion in the user's language should be shown. For a Persian user, «بله» / «باشه» / «آره» should be accepted the same way yes / ok / sure are accepted for English users, and short Persian sentences should not be dropped by word/char limits tuned for English. At minimum the suppression reason should be visible in the debug log.

  • Make the single-word whitelist locale-aware (at minimum add common affirmatives/negatives for languages the

generation prompt already handles: Persian, Arabic, Turkish, Russian, ...), or skip the whitelist when the suggestion
is a single non-Latin word.

  • Revisit too_many_words / too_long for RTL and agglutinative scripts, or ask the model for the short form in the

prompt and trust it.

  • Surface the suppression reason in the debug log (tengu_prompt_suggestion reason) so users and support can see why a

suggestion vanished; today the only way is reverse-engineering the binary.

  • Optionally show a subtle "thinking of a suggestion…" state in the composer while the fork is in flight in large sessions.

Error Messages/Logs

No error is logged; the fork completes successfully and the result is silently discarded.

All three turns below were warm (prompt cache hit, >= 2 assistant messages, no API error, account status allowed,
desktop setting "Prompt suggestions" = On, CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=true), so none of the documented
suppression reasons applied, yet nothing was shown:

| Case | Session context | Fork request (UTC) | x-client-request-id | Fork result | Shown? |
|---|---|---|---|---|---|
| A: assistant asked «ادامه بدهم یا نه؟» | Sonnet 5.5, ~48k cached | 2026-10-07T07:26:43Z | 6e335a91-eedb-4e36-bf39-b59f56698f9f | 1 assistant msg, 11 output tokens | No (user waited > 5 min) |
| B: assistant ended with a 5-point summary, no question | Fable 5.1, ~434k cached | 2026-10-07T12:14:27Z | a51a24ff-2316-4435-9754-46bb356c5cd2 | 1 assistant msg, 36 output tokens | No (user waited > 5 min) |
| C: assistant asked «شروع کنم؟» | Opus 5.5, ~483k cached | 2026-10-07T12:10:16Z | (fork finished 12:10:25Z) | 24 output tokens | Yes, ~10 s after the reply ended |

Case C also shows a second, UX-level problem: in large-context sessions the suggestion arrives 3-10 s after the reply
is complete, with no indicator, and the user has usually already typed the next message (which clears it).

Steps to Reproduce

Run the CLI in print mode with suggestions enabled and feed two user turns over stdin:

claude -p --input-format stream-json --output-format stream-json --verbose --prompt-suggestions \
  --model claude-sonnet-5-5 --strict-mcp-config --mcp-config '{"mcpServers":{}}'

Turn 1: سلام. فقط به فارسی و خیلی کوتاه جواب بده: آماده‌ای؟

| Turn 2 (user) | Assistant ends with | prompt_suggestion message on stdout |
|---|---|---|
| یک جملهٔ کوتاه فارسی بگو و بعد بپرس: «می‌خواهی ادامه بدهم و گزارش را بنویسم؟» | a yes/no question | emitted: بله، ادامه بده و گزارش را بنویس |
| فقط بپرس: «بله یا نه؟» و هیچ چیز دیگری نگو. | بله یا نه؟ | nothing (expected بله, dropped as too_few_words) |
| English control: Say one short sentence, then ask: 'Should I go ahead and write the report?' | a yes/no question | emitted: yes, go ahead |

The English equivalent of case 2 (yes) passes because yes is whitelisted; the Persian equivalent never can.

Claude Model

Sonnet 5.5 (repro), Opus 5.5 and Fable 5.1 (desktop sessions)

Is this a regression?

Not sure (the single-word whitelist and length filters exist at least since 2.1.270)

Claude Code Version

2.1.284 (Claude Code), also 2.1.270

Platform

Windows 11 Enterprise 10.0.26100; Claude Desktop 2.19675.0 (Code tab) and Windows Terminal

Additional context

  • Reproduced on 2026-10-06/07; proxy: none; api.anthropic.com reachable; desktop GrowthBook gate for prompt

suggestions on (force rule); idle-pause timeout off.

  • Settings: ~/.claude/settings.json env CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=true (added earlier to bypass the

allowed_warning rate-limit suppression, which was a separate, account-wide cause).

View original on GitHub ↗