openclaw - 💡(How to fix) Fix [Bug]: Spurious "Something went wrong" and Codex app-server failures in large Telegram direct sessions

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…

We observed two failures in an OpenClaw Telegram direct session using the OpenAI Codex runtime. At first sight they looked like aggressive/unsafe compaction causing context loss, but the logs point to two different failure modes:

  1. A Codex app-server failure before any assistant reply.
  2. A spurious visible "Something went wrong while processing your request. Please try again." message injected after a successful Codex run.

This happened on OpenClaw `2026.5.22 (a374c3a)`.

Error Message

session.ended status="error" error="codex app-server client is closed" lane task error: lane=main ... error="Error: codex app-server client is closed" lane task error: lane=session:<telegram-direct-session> ... error="Error: codex app-server client is closed"

Incident 2 - visible error after successful Codex run

  • If the Codex app-server closes, OpenClaw should either restart/retry cleanly or surface a precise runtime error without making the user suspect context loss.
  • At `23:53`, Codex succeeded, but OpenClaw still injected a generic visible error from `delivery-mirror`.

Root Cause

We observed two failures in an OpenClaw Telegram direct session using the OpenAI Codex runtime. At first sight they looked like aggressive/unsafe compaction causing context loss, but the logs point to two different failure modes:

  1. A Codex app-server failure before any assistant reply.
  2. A spurious visible "Something went wrong while processing your request. Please try again." message injected after a successful Codex run.

This happened on OpenClaw `2026.5.22 (a374c3a)`.

RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

We observed two failures in an OpenClaw Telegram direct session using the OpenAI Codex runtime. At first sight they looked like aggressive/unsafe compaction causing context loss, but the logs point to two different failure modes:

  1. A Codex app-server failure before any assistant reply.
  2. A spurious visible "Something went wrong while processing your request. Please try again." message injected after a successful Codex run.

This happened on OpenClaw `2026.5.22 (a374c3a)`.

Steps to reproduce

Environment

  • OpenClaw: `2026.5.22 (a374c3a)`
  • Surface: Telegram direct
  • Runtime/provider: OpenAI Codex
  • Model: `openai-codex/gpt-5.5`
  • Context configuration:
    • `contextTokens`: `230000`
    • `contextPruning.mode`: `cache-ttl`
    • `compaction.mode`: `default`
    • `reserveTokensFloor`: `32000`
    • `midTurnPrecheck.enabled`: `true`
    • `memoryFlush.enabled`: `true`

Incident 1 - Codex app-server closed before reply

Local time: `2026-05-26 22:44:27 Europe/Paris`

Session:

  • `3f9fde1f-8027-48e1-9b51-f827518d827c`

User prompt before the failure: ``` C'est laborieux la synchro iCloud ```

Trajectory shows: ``` session.ended status="error" promptError="codex app-server client is closed" ```

Gateway log around the same timestamp shows: ``` Codex agent harness failed; not falling back to embedded PI backend error="codex app-server client is closed" lane task error: lane=main ... error="Error: codex app-server client is closed" lane task error: lane=session:<telegram-direct-session> ... error="Error: codex app-server client is closed" Embedded agent failed before reply: codex app-server client is closed ```

There was no assistant reply for that turn. The user then used `/new` at about `22:50:35`, and OpenClaw saved the session context.

Incident 2 - visible error after successful Codex run

Local time: `2026-05-26 23:53:09 Europe/Paris`

Session:

  • `c72748c1-2cc5-42b0-8760-473a03e85f49`

The Codex rollout completed successfully at about `23:52:15` local time: ``` task_complete last_token_usage.total_tokens=209473 model_context_window=258400 ```

The assistant reply was successfully produced.

Then, without a new user message and without a transcript compaction event at that moment, OpenClaw appended a visible assistant message at `23:53:09`: ``` Something went wrong while processing your request. Please try again. ```

That message appears as: ``` provider/model: openclaw / delivery-mirror usage: 0 ```

The user then used `/new` at about `23:54:59`.

Expected behavior

  • If the Codex app-server closes, OpenClaw should either restart/retry cleanly or surface a precise runtime error without making the user suspect context loss.
  • A generic visible "Something went wrong" message should not be injected after a successful assistant turn.
  • Large Telegram sessions should not require manual `/new` recovery when the model run itself succeeded.

Actual behavior

  • At `22:44`, the Codex app-server closed and the Telegram session failed before reply.
  • At `23:53`, Codex succeeded, but OpenClaw still injected a generic visible error from `delivery-mirror`.
  • From the user side, both failures looked like unstable context/compaction behavior.

OpenClaw version

2026.5.22

Operating system

macOS26.4

Install method

npm global

Model

gpt5.5

Provider / routing chain

openclaw - OpenAI Codex

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

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

  • If the Codex app-server closes, OpenClaw should either restart/retry cleanly or surface a precise runtime error without making the user suspect context loss.
  • A generic visible "Something went wrong" message should not be injected after a successful assistant turn.
  • Large Telegram sessions should not require manual `/new` recovery when the model run itself succeeded.

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 [Bug]: Spurious "Something went wrong" and Codex app-server failures in large Telegram direct sessions