openclaw - 💡(How to fix) Fix Codex app-server: long agent replies silently truncated at ~1000-1100 chars (stop=null, aborted=false)

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…

Configured Codex/OAuth agent (gpt-5.5) replies are silently truncated at ~1000–1100 chars when invoked headlessly via openclaw message. The model is not aborted: data.aborted: false, stopReason/finishReason/errorMessage all null, yet assistantTexts[0] ends mid-sentence and the CLI wrapper reports status=timeout.

This is not the webchat DEFAULT_CHUNK_LIMIT = 4000 truncation — the number (1100 vs 4000) and the codepath (codex app-server stdio vs webchat outbound) are different.

Root Cause

Configured Codex/OAuth agent (gpt-5.5) replies are silently truncated at ~1000–1100 chars when invoked headlessly via openclaw message. The model is not aborted: data.aborted: false, stopReason/finishReason/errorMessage all null, yet assistantTexts[0] ends mid-sentence and the CLI wrapper reports status=timeout.

This is not the webchat DEFAULT_CHUNK_LIMIT = 4000 truncation — the number (1100 vs 4000) and the codepath (codex app-server stdio vs webchat outbound) are different.

Code Example

import json
for line in open("<session>.trajectory.jsonl"):
    e = json.loads(line)
    if e.get("type") == "model.completed":
        d = e["data"]
        print(d["aborted"], d.get("stopReason"), len(d["assistantTexts"][0]))
RAW_BUFFERClick to expand / collapse

Summary

Configured Codex/OAuth agent (gpt-5.5) replies are silently truncated at ~1000–1100 chars when invoked headlessly via openclaw message. The model is not aborted: data.aborted: false, stopReason/finishReason/errorMessage all null, yet assistantTexts[0] ends mid-sentence and the CLI wrapper reports status=timeout.

This is not the webchat DEFAULT_CHUNK_LIMIT = 4000 truncation — the number (1100 vs 4000) and the codepath (codex app-server stdio vs webchat outbound) are different.

Environment

  • OpenClaw: 2026.5.18 stable
  • Node v22.22.2, Linux 6.8.0 x86_64
  • Agent: Codex on OpenAI OAuth (gpt-5.5)
  • Channel: direct CLI (openclaw message), not Telegram/Discord

Symptom — last 10 invocations

UTC timereply charsabortedstopReasonerrorMessage
2026-05-20 06:28810falsenullnull
2026-05-20 06:23455falsenullnull
2026-05-20 06:15546falsenullnull
2026-05-19 18:50214 (short, ok)falsenullnull
2026-05-19 18:241101falsenullnull
2026-05-19 17:481074falsenullnull
2026-05-18 13:191009falsenullnull
2026-05-18 06:171066truenullnull

Replies above ~1000 chars cut mid-sentence; replies below complete cleanly.

Reproduction

  1. Configure a Codex/OAuth gpt-5.5 agent.
  2. Ask for a structured 1700-char reply (five labeled sections, 3–5 sentences each, "do not stop short").
  3. Inspect the resulting *.trajectory.jsonl:
import json
for line in open("<session>.trajectory.jsonl"):
    e = json.loads(line)
    if e.get("type") == "model.completed":
        d = e["data"]
        print(d["aborted"], d.get("stopReason"), len(d["assistantTexts"][0]))

Length lands 800–1100 chars; sentence is incomplete; aborted=false, stopReason=None.

Tested on 2026.5.19-beta.2 — worse, not better

Same prompt, same install, gateway restarted:

  • 5.18 stable: truncated at 810 chars
  • 5.19-beta.2: truncated at 455 chars

Rolled back to 5.18.

What this is NOT

  • Not a real timeout (no errorMessage, no codex 5xx).
  • Not DEFAULT_CHUNK_LIMIT (different number, different codepath).
  • Not auth (PR #73588 is in 5.18; the agent responds, just truncated).
  • Not quota (short prompts complete cleanly back-to-back).

Asks

  1. Identify the buffer/window capping the codex app-server stdio path at ~1100 chars.
  2. Make it configurable, or unbounded.
  3. Surface a real stopReason ("buffer_full" / "stream_cutoff") when this happens — currently null makes the internally-inconsistent state hard to detect from the outside.

Full trajectory .jsonl files and additional repros available on request.

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 Codex app-server: long agent replies silently truncated at ~1000-1100 chars (stop=null, aborted=false)