Skip to content

[Bug]: [agent/embedded] embedded run agent end: runId=xxxxxx isError=true model=gpt-5.4 provider=openai-codex error=terminated #48213

Closed

Description

@inexom

Bug type

Behavior bug (incorrect output/state without crash)

Summary

On version 3.13, when using the Codex GPT-5.4 model, if a submitted task is long-running and involves tool calls that
take a long time to complete, this bug is very likely to occur. It happens in both the Web UI and the TUI.

After it happens, OpenClaw stops sending any further replies. In the Web UI, it shows terminated; in the TUI, it shows
run error: terminated. However, the task seems to continue running in the background—it’s just that I can no longer
see any replies or output.
Also, the OpenClaw gateway frequently logs messages like the following:
20:38:35 [agent/embedded] embedded run agent end: runId=bc4e7499-e93b-4427-8c70-826c1e1b7cb0 isError=true model=gpt-5.4 provider=openai-codex error=terminated
20:39:06 [agent/embedded] embedded run agent end: runId=bc4e7499-e93b-4427-8c70-826c1e1b7cb0 isError=true model=gpt-5.4 provider=openai-codex error=terminated
20:39:26 [agent/embedded] embedded run agent end: runId=bc4e7499-e93b-4427-8c70-826c1e1b7cb0 isError=true model=gpt-5.4 provider=openai-codex error=terminated
20:39:57 [agent/embedded] embedded run agent end: runId=bc4e7499-e93b-4427-8c70-826c1e1b7cb0 isError=true model=gpt-5.4 provider=openai-codex error=terminated
20:41:59 [agent/embedded] embedded run agent end: runId=1ed3fd78-4ecf-4f9f-99c8-9ddbf2e60668 isError=true model=gpt-5.4 provider=openai-codex error=terminated

Steps to reproduce

  1. Start the OpenClaw gateway. Then, when using the Codex models openai-codex/gpt-5.4 or gpt-5.3-codex, ask the model
    to perform a relatively difficult task that requires multiple long-running tool calls.

Expected behavior

Long-running tasks with slow tool calls should continue normally without the session being marked as terminated.
The UI should remain responsive, and the user should still receive progress updates and the final reply.

Actual behavior

OpenClaw stops replying during long-running tasks that involve slow tool calls. The Web UI shows terminated, and
the TUI shows run error: terminated. No further progress or final reply is delivered, even though the task appears
to keep running in the background.
The gateway frequently logs:
provider=openai-codex error=terminated
20:39:57 [agent/embedded] embedded run agent end: runId=bc4e7499-e93b-4427-8c70-826c1e1b7cb0 isError=true model=gpt-5.4 provider=openai-codex error=terminated
20:41:59 [agent/embedded] embedded run agent end: runId=1ed3fd78-4ecf-4f9f-99c8-9ddbf2e60668 isError=true model=gpt-5.4 provider=openai-codex error=terminated

OpenClaw version

2026.3.13

Operating system

windows10

Install method

npm global

Model

openai-codex/gpt-5.4

Provider / routing chain

OpenClaw -> Cloudflare AI Gateway -> OpenAI (Codex)

Config file / key location

No response

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

Activity

  1. added
    bug
    on Mar 16, 2026
  2. added
    bug:behavior
    on Mar 16, 2026
  3. inexom commented on Mar 16, 2026

    @inexom
    Author
    Image
  4. Firehdx commented on Mar 16, 2026

    @Firehdx

    I launch my tui with backbone Minimax M2.5, and encountered similar issue: openclaw stopped tool calling or sending message, came down to an ERROR: "[agent/embedded] embedded run agent end: runId=XXXXXX isError=true error=Network connection lost."

  5. JeeTan commented on Mar 17, 2026

    @JeeTan

    I launch my tui with backbone Minimax M2.5, and encountered similar issue: openclaw stopped tool calling or sending message, came down to an ERROR: "[agent/embedded] embedded run agent end: runId=XXXXXX isError=true error=Network connection lost."我用 backbone Minimax M2.5 启动我的 Tui,遇到了类似问题:openclaw 停止调用或发送消息,出现错误:“[agent/embedded] embedded run agent end: runId=XXXXXX isError=true error=网络连接丢失。”

    Me too. Do you have any solutions?

  6. Firehdx commented on Mar 17, 2026

    @Firehdx

    I launch my tui with backbone Minimax M2.5, and encountered similar issue: openclaw stopped tool calling or sending message, came down to an ERROR: "[agent/embedded] embedded run agent end: runId=XXXXXX isError=true error=Network connection lost."我用 backbone Minimax M2.5 启动我的 Tui,遇到了类似问题:openclaw 停止调用或发送消息,出现错误:“[agent/embedded] embedded run agent end: runId=XXXXXX isError=true error=网络连接丢失。”

    Me too. Do you have any solutions?

    I switched my backbone to other models, e.g. Step-3.5 Flash or Kimi K2.5, and it worked for me.
    Once I switched back to M2.5, the error appeared still, so I guess the problem is the network connection from the router site (OpenRouter for me) to the provider.

  7. steipete commented on Apr 25, 2026

    @steipete
    Contributor

    Closing this as implemented after Codex review.

    Current main already contains a targeted fix for bare embedded-runner transport failures reported as terminated / Request failed on Codex/OpenAI paths, with regression coverage and changelog entry. This matches the issue’s reported symptom closely enough to close as implemented on main.

    What I checked:

    So I’m closing this as already implemented rather than keeping a duplicate issue open.

    Review notes: reviewed against b45329334965; fix evidence: commit 972c7112a292.

  8. locked as resolved and limited conversation to collaborators on Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugbug:behavior

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions