Codex sessions get redirected back to “new session” a few seconds after first prompt
Image Variant
Full (latest / dev)
Image Tag / Version
1.1.7
Host OS
Linux
What happened?
When starting a new Codex session, the session is created and the first prompt is sent successfully, but shortly after that the UI returns to the “new session” page instead of staying on the active session.
The session itself is not lost and can still be reopened manually.
From debugging, the likely cause is that Codex emits a complete event without exitCode: 0, while the frontend only finalizes navigation for newly created sessions when j.exitCode === 0.
Claude includes exitCode: 0 in its complete event, so it does not have this issue.
What did you expect?
After sending the first prompt in a new Codex session, the UI should stay on the active session and finalize navigation to the real session ID, just like it does for Claude.
The frontend should not fall back to the “new session” page after completion.
Steps to reproduce
- Open HolyClaude / CloudCLI.
- Start a new chat with Codex.
- Send the first prompt.
- Wait a few seconds for the first turn to complete.
- Observe that the UI returns to the “new session” page.
- Reopen the created session manually and confirm it still exists.
Technical note :
Likely root cause: update 1.27.1 in siteboon/claude-code-ui
- openai-codex.js sends:
{ kind: 'complete', actualSessionId: thread.id, sessionId: currentSessionId }
- Claude sends:
{ kind: 'complete', exitCode: 0, actualSessionId: ..., sessionId: ... }
- frontend completion logic appears to require:
j.exitCode === 0
Suggested fix: add exitCode: 0 to the Codex complete event in openai-codex.js, to match Claude’s behavior.
Docker Compose / Run command
Logs / Error output
Thanks. This one was real.
The important part was that the Codex session was not actually getting lost. It got created, the first prompt went through, and then the UI kicked you back to the new session page. That pointed at session completion and navigation handling, not session creation.
I checked the CloudCLI side and the completion path really was treating successful completion too narrowly.
This is fixed in v1.1.9.
What changed:
Successful completion no longer depends on an explicit exitCode === 0 just to finalize the pending session view.
That keeps the UI on the active Codex session after the first prompt instead of bouncing back to new session.
Short version: the session existed before, and now the UI should stop mishandling completion.
If you still hit this on v1.1.9, reply here and I’ll reopen it.
Closing as fixed in v1.1.9.
Hi No it’s not fixed on my end. Tried with a private session too just in case. Also, there is a cloudcli update request, I don’t now if we need to do it ? Thanks
Hi I still have this bug, do you too ? Thanks
Still broken on latest image (coderluii/holyclaude:latest, 2026-05-29). Environment: Synology NAS DS3622xs+ and 7.3.2-86009 Update 3 , x86_64, Docker Symptoms:
UI loads fine Sessions can be created No responses received — chat and agent both broken
Error: SDK query error: Claude Code native binary at .../claude-agent-sdk-linux-x64/claude exists but failed to launch. [ERROR] Chat WebSocket error: Claude Code native binary exists but failed to launch. Binary check — works fine when called directly: bashdocker exec holyclaude .../claude --version → 2.1.141 (Claude Code)
Binary launches OK manually but fails when spawned by the app.
Just for info, I have holyclaude in docker on a Synology DS920+ with DSM 7.2.2-72806 Update 4 and holyclaude works
@tchirou thanks for coming back to this and for saying plainly that v1.1.9 still did not cover your setup. You were right to push on it.
I released v1.3.0 with a second, lower-level fix for the Codex path. The older v1.1.9 change handled the UI/session-finalization side, but the current CloudCLI Codex runtime was still sending the successful final complete event without the explicit success code the UI expects.
What changed in v1.3.0:
- HolyClaude now patches CloudCLI's Codex runtime so successful Codex completion emits
exitCode: 0. - The Docker build fails if the CloudCLI source/runtime payload moves or changes, instead of silently losing the patch.
- The changelog, troubleshooting guide, and security note were updated.
- I opened the upstream CloudCLI fix here: siteboon/claudecodeui#879. The older draft PR #614 is closed as superseded.
Update with:
docker compose pull
docker compose up -d
Verified:
- GitHub release
v1.3.0is published. - Docker workflow passed for
slim,full, and the Docker Hub description update. - Docker Hub and GHCR tags are published:
latest,slim,1.3.0,1.3.0-slim. - Pulled the published Docker Hub images and confirmed both
coderluii/holyclaude:1.3.0andcoderluii/holyclaude:1.3.0-slimincludeexitCode: 0in CloudCLI's Codex source/runtime files. - Ran an authenticated smoke against the published
1.3.0image with CloudCLI's runtime Codex handler. It created a Codex session and emitted the patched finalcompleteevent withexitCode: 0.
Closing this because the release now covers the actual Codex completion payload that was missing after v1.1.9.
One note: @nobelp's Claude native-binary launch error above is a different failure mode from this Codex redirect bug. If that still happens on v1.3.0, it should be tracked separately with the Claude launch logs.