Skip to content

Codex app-server: long agent replies silently truncated at ~1000-1100 chars (stop=null, aborted=false) #84516

@olegchatgpt401-sys

Description

@olegchatgpt401-sys

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 time reply chars aborted stopReason errorMessage
2026-05-20 06:28 810 false null null
2026-05-20 06:23 455 false null null
2026-05-20 06:15 546 false null null
2026-05-19 18:50 214 (short, ok) false null null
2026-05-19 18:24 1101 false null null
2026-05-19 17:48 1074 false null null
2026-05-18 13:19 1009 false null null
2026-05-18 06:17 1066 true null null

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

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.

Metadata

Metadata

Assignees

Labels

P1High-priority user-facing bug, regression, or broken workflow.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions