#GPT 5.4 codex terminating with no explanation

1 messages · Page 1 of 1 (latest)

tawny blade
#

Without any changes, I'm suddenly not acle to communicate with my agent. I am getting repeated unexplained terminations which hang the system. Every once in a while I get through, but the next promp fails in the same way.

openclaw@openclaw:~/.openclaw/agents/main/sessions$ tail -f 28db3300-0ec8-418a-97cb-16b7352ca936.jsonl

{"type":"custom","customType":"openclaw:bootstrap-context:full","data":{"timestamp":1776960963513,"runId":"d4b555e6-55ad-4a9e-ae49-815e63e44735","sessionId":"28db3300-0ec8-418a-97cb-16b7352ca936"},"id":"3dad69c1","parentId":"791d699e","timestamp":"2026-04-23T16:16:03.513Z"}

Any recommendations as to what is happening?

foggy patioBOT
pallid lagoonBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

foggy patioBOT
tawny blade
#

Here is the termination error:
{"type":"message","id":"791d699e","parentId":"87844417","timestamp":"2026-04-23T16:16:03.420Z","message":{"role":"assistant","content":[{"type":"thinking","thinking":""}],"api":"openai-codex-responses","provider":"openai-codex","model":"gpt-5.4","usage":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"totalTokens":0,"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"total":0}},"stopReason":"error","timestamp":1776960954196,"responseId":"resp_0a775f8bd8b6117b0169ea45ba80688199b6decc4a4df3bdbd","errorMessage":"terminated"}}

winter dewBOT
#

That openclaw:bootstrap-context:full line is probably not the failure. It just means OpenClaw finished injecting the workspace/bootstrap context into the run.

For GPT-5.4 Codex, there are a couple recent regressions, and the key question is which model path you’re using:

  • codex/gpt-5.4 = bundled Codex harness path
  • openai-codex/gpt-5.4 = OpenAI Codex OAuth path

Can you paste these?

openclaw --version
openclaw status --all
openclaw models status
openclaw infer model run --local --model "<exact model ref>" --prompt "pong" --json
openclaw logs --follow
#

If the gateway is actually restarting/crashing, also run:

openclaw gateway stability --bundle latest

Two very useful clues:

  • if logs show Long error truncated: <html>, that points at a recent openai-codex/gpt-5.4 regression
  • if you’re on codex/gpt-5.4 and it just hangs with no useful Codex output, that matches a recent bundled Codex harness hang

Docs:

Paste the version + exact model ref first, that’ll narrow this down fast.

#

Yep, this is more informative.

That bootstrap-context:full record is just a marker. The real clue is this:

  • provider: "openai-codex"
  • model: "gpt-5.4"
  • api: "openai-codex-responses"
  • stopReason: "error"
  • errorMessage: "terminated"
  • token usage stays at 0

So this looks much more like the openai-codex transport/request dying very early, not a broken session file or bootstrap problem.

There have been a few recent regressions in this exact openai-codex/gpt-5.4 lane, so first thing I want is your version:

#
openclaw --version

Then I’d run this tiny repro:

openclaw infer model run --local --model "openai-codex/gpt-5.4" --prompt "pong" --json
openclaw logs --follow

A good workaround to try right away is forcing the transport instead of leaving it on auto:

openclaw config set agents.defaults.models '{"openai-codex/gpt-5.4":{"params":{"transport":"websocket"}}}' --strict-json --merge
openclaw gateway restart
#

If it still fails, flip it to SSE instead:

openclaw config set agents.defaults.models '{"openai-codex/gpt-5.4":{"params":{"transport":"sse"}}}' --strict-json --merge
openclaw gateway restart

So, short version: I do not think your transcript is corrupt. I think the openai-codex/gpt-5.4 request path is terminating before output starts.

If you paste:

  • openclaw --version
  • output of the tiny infer model run
  • 20 to 40 lines from openclaw logs --follow

…I can probably tell you pretty quickly whether this is the current Codex regression bucket or something local.

Docs:

tawny blade
#

Version: OpenClaw 2026.4.15 (041266a)
infer model run:
{
"ok": true,
"capability": "model.run",
"transport": "local",
"provider": "openai-codex",
"model": "gpt-5.4",
"attempts": [],
"outputs": [
{
"text": "pong, and yes, we’re talking again.\n\nThe gateway restart likely cleared whatever was terminating runs. If you want, I can go back to either:\n1. runtime-log investigation, or\n2. finishing the wiki skill files.",
"mediaUrl": null
}
]
}
But when I try in the UI, this is what logs --follow shows:
16:30:49+00:00 warn agent/embedded {"subsystem":"agent/embedded"} {"event":"embedded_run_agent_end","tags":["error_handling","lifecycle","agent_end","assistant_error"],"runId":"296c5625-6b23-4eca-9bad-29c17e995db4","isError":true,"error":"terminated","failoverReason":null,"model":"gpt-5.4","provider":"openai-codex","rawErrorPreview":"terminated","rawErrorHash":"sha256:e8c95a2a7271","providerRuntimeFailureKind":"unknown"} embedded run agent end
16:31:02+00:00 warn agent/embedded {"subsystem":"agent/embedded"} {"event":"embedded_run_agent_end","tags":["error_handling","lifecycle","agent_end","assistant_error"],"runId":"296c5625-6b23-4eca-9bad-29c17e995db4","isError":true,"error":"terminated","failoverReason":null,"model":"gpt-5.4","provider":"openai-codex","rawErrorPreview":"terminated","rawErrorHash":"sha256:e8c95a2a7271","providerRuntimeFailureKind":"unknown"} embedded run agent end

winter dewBOT
#

Nice, that narrows it down a lot.

If openclaw infer model run --local --model "openai-codex/gpt-5.4" works, but the UI session dies with error:"terminated", then this is not a general provider/auth/model outage.

It’s much more likely one of these:

  1. the current UI/chat-bound session is stale/poisoned, or
  2. the embedded-run UI lane is tripping a current openai-codex/gpt-5.4 bug

The fastest next test is:

1. Try a fresh session in the UI

Use /new, then retry the same prompt.

If /new fixes it, the old session state was the problem. That’s a real bug class we’ve seen with Codex sessions.

2. If /new does not fix it, force transport

#

Try WebSocket first:

openclaw config set agents.defaults.models '{"openai-codex/gpt-5.4":{"params":{"transport":"websocket"}}}' --strict-json --merge
openclaw gateway restart

If that still fails, try SSE:

openclaw config set agents.defaults.models '{"openai-codex/gpt-5.4":{"params":{"transport":"sse"}}}' --strict-json --merge
openclaw gateway restart

3. If a fresh UI session still fails

At that point I’d treat it as a 2026.4.15 embedded-run regression and file a GitHub issue with:

#
openclaw gateway diagnostics export

Include:

  • openclaw --version
  • the failing runId
  • one working infer model run
  • one failing UI run
  • those logs --follow lines

The important signal in your log is this part:

  • providerRuntimeFailureKind:"unknown"
  • error:"terminated"

That usually means OpenClaw is only seeing a generic abort/termination in the chat-bound run, not a clean auth, rate-limit, or model-not-found failure.

#

So yeah, I’d try /new first. If that works, we’ve isolated it to session state, not the model path.

tawny blade
#

Ok, I did /new and here's what happened:

16:47:16+00:00 info hooks/session-memory {"subsystem":"hooks/session-memory"} Session context saved to ~/.openclaw/workspace/memory/2026-04-23-skill-checkpoint.md
16:48:33+00:00 warn agent/embedded {"subsystem":"agent/embedded"} {"event":"embedded_run_failover_decision","tags":["error_handling","failover","assistant","surface_error"],"runId":"active-memory-mobpu0wn-34d48a60","stage":"assistant","decision":"surface_error","failoverReason":"timeout","profileFailureReason":"timeout","provider":"openai-codex","model":"gpt-5.4-mini","sourceProvider":"openai-codex","sourceModel":"gpt-5.4-mini","profileId":"sha256:ecdff1c9920a","fallbackConfigured":true,"timedOut":true,"aborted":true} embedded run failover decision
16:49:07+00:00 warn agent/embedded {"subsystem":"agent/embedded"} {"event":"embedded_run_agent_end","tags":["error_handling","lifecycle","agent_end","assistant_error"],"runId":"c8515579-0314-4354-a018-6b6d297b863f","isError":true,"error":"terminated","failoverReason":null,"model":"gpt-5.4","provider":"openai-codex","rawErrorPreview":"terminated","rawErrorHash":"sha256:e8c95a2a7271","providerRuntimeFailureKind":"unknown"} embedded run agent end
16:49:10+00:00 info gateway/ws {"subsystem":"gateway/ws"} webchat connected conn=e8d3e134-e4ba-4bf7-90cc-5eb557b416f3 remote=10.10.30.100 client=openclaw-control-ui webchat v2026.4.15
16:49:25+00:00 warn agent/embedded {"subsystem":"agent/embedded"} {"event":"embedded_run_agent_end","tags":["error_handling","lifecycle","agent_end","assistant_error"],"runId":"c8515579-0314-4354-a018-6b6d297b863f","isError":true,"error":"terminated","failoverReason":null,"model":"gpt-5.4","provider":"openai-codex","rawErrorPreview":"terminated","rawErrorHash":"sha256:e8c95a2a7271","providerRuntimeFailureKind":"unknown"} embedded run agent end

winter dewBOT
#

Ah, that’s the smoking gun.

This line is normal and not the problem:

hooks/session-memory ... Session context saved ...

The suspicious part is this:

runId":"active-memory-...
...
"provider":"openai-codex","model":"gpt-5.4-mini"
...
"failoverReason":"timeout","timedOut":true,"aborted":true
#

So now I’d bet the problem is Active Memory, not bootstrap, and probably not your main session transcript either.

There’s already a fresh regression report in this exact area, Active Memory + openai-codex causing slowdown/timeouts/terminated runs on 2026.4.14, and your 2026.4.15 logs look very similar.

Try this first in the UI

/active-memory off

Then retry the same prompt.

If that fixes it, and you want it off for future chats too:

/active-memory off --global
#

Why I think this is it

  • direct infer model run works
  • /new did not fix it
  • Active Memory is visibly timing out before/around the main reply
  • then the main run ends with generic error:"terminated"

That pattern fits Active Memory interference really well.

If turning it off fixes the issue, I’d keep it off for now and file a GitHub issue with:

openclaw gateway diagnostics export

Plus:

  • openclaw --version