Repository navigation
Closed
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-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 live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.
Description
Description
When using openai/gpt-5.5 with the bundled Codex plugin in stdio transport mode, the main session works but subagents consistently fail with:
FailoverError: LLM request failed: network connection error.
Environment
- OpenClaw version: 2026.6.1
- Runtime:
agentRuntime.id: "openclaw" - Codex standalone: 0.137.0 (installed separately)
- Codex daemon: running (ephemeral mode)
- Codex doctor: 18/18 OK, ChatGPT backend reachable (HTTP 101)
- Auth: ChatGPT OAuth, tokens valid
- Docker: Yes (Debian 12, Unraid host)
Reproduction
- Configure Codex plugin with stdio transport and bundled binary
- Spawn a subagent:
sessions_spawn(model="openai/gpt-5.5", task="hello") - Subagent fails with
network connection error
What works
- ✅ Main session on
openai/gpt-5.5withagentRuntime.id="openclaw"— works initially - ✅ Codex daemon running,
codex doctorall green - ✅ OpenAI API reachable from container
- ✅ Auth tokens valid and fresh
What does not work
- ❌ Subagents on
openai/gpt-5.5— alwaysnetwork connection error - ❌ Codex app-server in stdio mode — exits immediately when spawned by OpenClaw
- ❌ WebSocket transport to daemon socket — connection fails
Hypothesis
The subagent code path uses a different transport/resolution mechanism than the main session. When agentRuntime.id="openclaw" is set, OpenClaw uses its built-in HTTP transport, but subagents may not inherit the same auth context or may have a different network resolution path.
Impact
GPT-5.5 via ChatGPT subscription OAuth is unusable for subagents and cron jobs, limiting it to main session use only.
Reported by Otti (OpenClaw assistant) on behalf of Ruben.
Reacted by clawsweeper
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-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 live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.
Type
Fields
Priority
None yet
Activity
clawsweeper commentedon Jun 4, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 4, 2026, 1:23 PM ET / 17:23 UTC.
Summary
Keep open: the report is fresh, matches documented OpenAI/Codex subagent and auth-routing surfaces, and current main has no behavioral fix beyond v2026.6.1 in the relevant paths.
Reproducibility: yes. source-backed but not live reproduced: the issue supplies concrete steps and current source shows the subagent model/session/harness/auth path, but the failure requires a live ChatGPT/Codex OAuth environment not exercised here.
Next step
The repair crosses subagent session setup, OpenAI/Codex runtime selection, OAuth profile forwarding, and app-server transport startup, so it needs maintainer debugging with live Codex proof before a safe fix PR.
Review details
Best possible solution:
Reproduce the explicit
sessions_spawnpath withopenai/gpt-5.5, confirm whether the child keeps the intended runtime and auth profile, then fix the narrow session/auth/transport propagation break with regression coverage and live Codex proof.Do we have a high-confidence way to reproduce the issue?
Yes, source-backed but not live reproduced: the issue supplies concrete steps and current source shows the subagent model/session/harness/auth path, but the failure requires a live ChatGPT/Codex OAuth environment not exercised here.
Is this the best way to solve the issue?
No patch is proposed; the best likely fix is to preserve one canonical runtime/auth decision for child sessions rather than add a new config knob or broad fallback.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
agentRuntime.id: "openclaw", Codex app-server stdio, and WebSocket daemon attempts, so maintainers should separate compatibility-route failure from native Codex harness failure before changing defaults.Codex review notes: model gpt-5.5, reasoning high; reviewed against 1794efbba18d.
Label changes
Label changes:
P1: The reported failure breaks subagent and cron-style agent workflows for an affected OpenAI/Codex OAuth setup while the main session still works.impact:session-state: The issue centers on child subagent sessions failing to inherit or resolve the same effective runtime path as the main session.impact:auth-provider: The suspected failure surface includes OpenAI/Codex OAuth profile selection and Codex app-server auth propagation.issue-rating: 🐚 platinum hermit: Current issue advisory state selects this label.clawsweeper:needs-live-repro: Current issue advisory state selects this label.clawsweeper:no-new-fix-pr: Current issue advisory state selects this label.clawsweeper:needs-maintainer-review: Current issue advisory state selects this label.Label justifications:
P1: The reported failure breaks subagent and cron-style agent workflows for an affected OpenAI/Codex OAuth setup while the main session still works.impact:session-state: The issue centers on child subagent sessions failing to inherit or resolve the same effective runtime path as the main session.impact:auth-provider: The suspected failure surface includes OpenAI/Codex OAuth profile selection and Codex app-server auth propagation.Evidence reviewed
Acceptance criteria:
sessions_spawn(model="openai/gpt-5.5", task="hello")./status,/codex status, child session entry runtime/model/auth fields, app-server stderr tail, and Gateway logs with secrets redacted.What I checked:
openai/gpt-5.5session works butsessions_spawn(model="openai/gpt-5.5", task="hello")fails withFailoverError: LLM request failed: network connection error, with Codex doctor green and valid ChatGPT OAuth.../codexsource inspection before any Codex verdict; scoped agent and extension AGENTS files were also read. (AGENTS.md:11, 1794efbba18d)VISION.md:16, 1794efbba18d)openai/*embedded agent turns run through the native Codex app-server runtime by default, while explicitagentRuntime.id: "openclaw"remains a compatibility route for selected OAuth/API-key handling. Public docs:docs/providers/openai.md. (docs/providers/openai.md:14, 1794efbba18d)docs/plugins/codex-harness.md. (docs/plugins/codex-harness.md:448, 1794efbba18d)modelOverrideSource, so an explicitopenai/gpt-5.5spawn is expected to carry a runtime-relevant model into the child session. (src/agents/subagent-spawn-plan.ts:49, 1794efbba18d)Likely related people:
extensions/codex/harness.ts,extensions/codex/src/app-server/run-attempt.ts,src/agents/harness/selection.ts)extensions/codex/src/app-server/run-attempt.ts,src/agents/harness/policy.ts,src/agents/model-runtime-policy.ts)src/agents/subagent-spawn.ts)How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.joshavant commentedon Jun 9, 2026
Thanks for the detailed report and repro notes.
I was able to reproduce the failure class live with ChatGPT/Codex OAuth on AWS Crabbox against
v2026.6.1:openai/gpt-5.5through the OpenClaw runtime failed withFailoverError: LLM request failed: network connection error.That matched the error surface from this issue.After comparing against current
main, the same live Gateway + OAuth +agentRuntime.id: "openclaw"setup passed a main turn plussessions_spawn/sessions_yield. I then cherry-picked only the existing fix commit ontov2026.6.1, and the same scenario passed there too. That isolates the root cause to ab0a633.What happened: the ChatGPT/Codex backend can return valid streamed SSE/JSON responses without a
content-typeheader. Inv2026.6.1, OpenClaw rejected that response before the OpenAI SDK could consume it, and the error surfaced as the generic network connection failure. Currentmainnow sniffs and normalizes those valid missing-header streamed responses while still rejecting invalid HTML/non-API responses.Live proof:
v2026.6.1: reproduced on AWS Crabbox, runrun_4aa6b5d46047main: passed on AWS Crabbox, runrun_23c5b3b81e51v2026.6.1+ fix commitab0a633ab98b4676370eec31eee57d2fbe163647: passed on AWS Crabbox, runrun_4fec2376a0afOne note: the WebSocket daemon path mentioned in the report is separate; upstream Codex currently documents WebSocket as experimental/unsupported. The supported stdio/OpenClaw runtime path is the part validated here, and that path is fixed on
main.Closing as fixed on
main.