openclaw - 💡(How to fix) Fix GPT-5 chat brevity guard truncates user-visible Signal replies before delivery

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…

OpenClaw's GPT-5 chat brevity guard appears to be mutating final reply payloads before they reach channel delivery. On Signal this shows up as assistant replies being cut off mid-answer and ending with a literal ....

This does not look like Signal chunking dropping later chunks. The text is already shortened before Signal receives it.

Root Cause

This likely affects any user-visible external channel that uses the same agent-runner delivery path, not just Signal: Signal, WhatsApp, Telegram, etc. It is especially surprising because it silently changes the model's final visible answer after generation.

Code Example

applyOpenAIGptChatReplyGuard({
  provider: fallbackProvider,
  model: fallbackModel,
  commandBody: params.commandBody,
  isHeartbeat: params.isHeartbeat,
  payloads: runResult.payloads,
});

---

applyOpenAIGptChatReplyGuard({
  provider: fallbackProvider,
  model: fallbackModel,
  commandBody: params.commandBody,
  isHeartbeat: params.isHeartbeat,
  payloads: runResult.payloads,
  messageProvider: params.followupRun.run.messageProvider,
  surface: params.sessionCtx.Surface ?? params.sessionCtx.OriginatingChannel,
});

---

const channel = params.messageProvider ?? params.surface;
if (channel && !isInternalMessageChannel(channel)) {
  return;
}
RAW_BUFFERClick to expand / collapse

Summary

OpenClaw's GPT-5 chat brevity guard appears to be mutating final reply payloads before they reach channel delivery. On Signal this shows up as assistant replies being cut off mid-answer and ending with a literal ....

This does not look like Signal chunking dropping later chunks. The text is already shortened before Signal receives it.

Impact

This likely affects any user-visible external channel that uses the same agent-runner delivery path, not just Signal: Signal, WhatsApp, Telegram, etc. It is especially surprising because it silently changes the model's final visible answer after generation.

Evidence

Observed in a live Signal direct conversation:

  • Signal delivery was chunking correctly and no send errors/stale signal-cli daemon issues were found.
  • The sent-message body in the Signal DB was already shortened and ended with literal ....
  • Example diagnostic: the assistant transcript contained a full ~1600 char answer, while the Signal-sent body was ~300 chars and ended with ....
  • Session/channel state was Signal throughout, not stale webchat routing.

The installed/runtime culprit was traced to the GPT chat guard in the agent runner. In source:

  • src/auto-reply/reply/agent-runner-execution.ts
  • shortenChattyFinalReplyText(...) appends ...
  • applyOpenAIGptChatReplyGuard(...) mutates payload.text
  • The call site runs after runResult.payloads is assembled and before delivery

Relevant call shape today:

applyOpenAIGptChatReplyGuard({
  provider: fallbackProvider,
  model: fallbackModel,
  commandBody: params.commandBody,
  isHeartbeat: params.isHeartbeat,
  payloads: runResult.payloads,
});

Expected behavior

Provider/channel delivery should receive the model's final reply unchanged unless the user or config explicitly opts into final-answer rewriting.

If a channel has byte/message-size limits, the channel plugin should split/chunk or fail loudly, not receive already-shortened text.

Actual behavior

For GPT-5 replies that match the guard heuristic, OpenClaw shortens payload.text before channel delivery. Signal then correctly sends the shortened payload.

Proposed fix

Gate the brevity guard so it only applies to internal/control UI channels, or make it opt-in config defaulting off.

Smallest robust shape:

applyOpenAIGptChatReplyGuard({
  provider: fallbackProvider,
  model: fallbackModel,
  commandBody: params.commandBody,
  isHeartbeat: params.isHeartbeat,
  payloads: runResult.payloads,
  messageProvider: params.followupRun.run.messageProvider,
  surface: params.sessionCtx.Surface ?? params.sessionCtx.OriginatingChannel,
});

Then inside the guard:

const channel = params.messageProvider ?? params.surface;
if (channel && !isInternalMessageChannel(channel)) {
  return;
}

Even better: make this guard an explicit config option, default off for all user-visible delivery channels.

Notes

This is not a request to remove brevity prompting. The problem is silent post-processing of the already-generated final answer for external chat channels.

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…

FAQ

Expected behavior

Provider/channel delivery should receive the model's final reply unchanged unless the user or config explicitly opts into final-answer rewriting.

If a channel has byte/message-size limits, the channel plugin should split/chunk or fail loudly, not receive already-shortened text.

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 GPT-5 chat brevity guard truncates user-visible Signal replies before delivery