openclaw - 💡(How to fix) Fix Add config option to disable applyOpenAIGptChatReplyGuard (gpt-5 reply-brevity guard)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

The reply-brevity guard introduced (at latest) in 2026.5.12 silently truncates long gpt-5 agent replies. There's no way to disable it via config. Request: add a config setting (e.g. agents.defaults.replyBrevityGuard: "off", or per-model equivalent) so agents that produce structured long-form output can opt out.

Root Cause

Related

Filed separately from #82858 (multi-chunk Discord drop in sendDurableMessageBatch); both surface as "truncated reply in Discord" but root causes are distinct.

Fix Action

Workaround

Patched shouldApplyOpenAIGptChatGuard locally to always return false. Idempotent reapply after every openclaw update.

RAW_BUFFERClick to expand / collapse

Summary

The reply-brevity guard introduced (at latest) in 2026.5.12 silently truncates long gpt-5 agent replies. There's no way to disable it via config. Request: add a config setting (e.g. agents.defaults.replyBrevityGuard: "off", or per-model equivalent) so agents that produce structured long-form output can opt out.

Repro

  1. Agent configured with agents.defaults.model.primary: "openai/gpt-5.5" (or any openai/gpt-5*).
  2. Send a short prompt (<= 120 chars) that doesn't contain detail|detailed|depth|deep dive|explain|compare|walk me through|why|how. Example: "give me another pass with broader patterns".
  3. Agent produces a structured multi-item reply (>= 6 sentences, multi-paragraph, often with phrases like "in summary" / "here's what").

Observed

Reply gets silently truncated to <= 6 sentences and <= 900 chars with ... appended. No journal log line is emitted. Full reply IS written to the session jsonl, but the payload reaching the messaging channel (Discord) is the shortened version.

Localization

The cut happens in agent-runner.runtime-*.js in applyOpenAIGptChatReplyGuard() (called at the end of runAgentWithFallback just before returning). Conditions:

  • provider matches openai*
  • model matches /^gpt-5(?:[.-]|\$)/i
  • Not a heartbeat
  • Prompt <= 120 chars and lacks the detail-request keywords
  • Reply scores >= 4 on scoreChattyFinalReplyText (length, sentence count, paragraph count, summary phrases)

When all hold, shortenChattyFinalReplyText runs with hardcoded GPT_CHAT_BREVITY_SOFT_MAX_SENTENCES = 6 / GPT_CHAT_BREVITY_SOFT_MAX_CHARS = 900.

Why the heuristic is misaligned for structured-output agents

Some agents (e.g. a "synthesize ideas" assistant) produce intentionally long numbered lists as their core value. The chattiness signals the heuristic looks for ("in summary", multi-paragraph, >= 6 sentences) are features, not noise, for these agents. A short user prompt is meant to elicit a long structured reply, not a one-paragraph summary.

Workaround

Patched shouldApplyOpenAIGptChatGuard locally to always return false. Idempotent reapply after every openclaw update.

Related

Filed separately from #82858 (multi-chunk Discord drop in sendDurableMessageBatch); both surface as "truncated reply in Discord" but root causes are distinct.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Add config option to disable applyOpenAIGptChatReplyGuard (gpt-5 reply-brevity guard)