Repository navigation
Description
Summary
I am seeing two symptoms after switching Codex to the opencodex provider path. I did not see this behavior when using native GPT/Codex without opencodex.
This is separate from #17. #17 is about mobile-created routed-model threads failing ChatGPT account model validation. This issue is about streaming/event stability after a thread is already running through the local opencodex setup.
Environment
- OS: Windows 11
- opencodex proxy: local,
http://localhost:10100 /healthzversion:2.1.3- Codex app account mode: ChatGPT account
- Codex provider config: opencodex injected as default provider
- Models observed:
gpt-5.5pass-through via the opencodex provider path- routed models such as
umans/umans-kimi-k2.7
- Mobile app was used to observe and send follow-up prompts to local laptop threads.
Symptom 1: live streaming text duplicates partial chunks
While a turn is streaming on mobile, the visible text sometimes duplicates pieces of words or chunks, for example:
좋좋아아
op opencencodexodex
GitGitHubHub
issue issue
After the turn finishes, the final stored message is corrected and appears normal in the thread history. So this looks like a live streaming delta/rendering issue rather than permanent message corruption.
Symptom 2: code-edit turns can stall after commentary, before fileChange
In a delegated code-edit thread, the agent reached the point where it said it was about to edit files, for example:
수정 들어간다. `rust-cargo-lock.ts`에 ... 넣고 ...
But the turn produced no fileChange event and no actual code edit. The thread later showed a top-level systemError state even though the individual turn summary looked partially completed.
When I sent a much smaller recovery prompt to the same thread, asking for only one tiny file change, the next turn successfully emitted a fileChange event and completed.
That makes the failure look like it happens around the transition from streamed assistant commentary into tool/file-change events, especially after context compaction or in large WIP code sessions.
Why I suspect the opencodex path
The key clue is that I did not see this behavior when using native GPT/Codex directly. The symptoms started after routing Codex through opencodex. Even OpenAI models such as gpt-5.5 may still be going through the opencodex provider/proxy path in this setup.
I do not know whether the root cause is in opencodex's Responses/SSE translation, Codex app remote-thread handling, or an interaction between both. But the visible behavior suggests that the streaming/tool event contract may not be perfectly matching what Codex expects.
Expected behavior
- Live streaming should not duplicate partial chunks.
- If a turn reaches the file-edit phase, it should either emit the expected
fileChangeevent or fail with a clear error. - Context compaction should not leave the thread in a state where the agent only emits commentary and silently stops before the actual edit.
Current workaround
- Keep opencodex code-edit turns very small.
- Treat commentary such as “수정 들어간다” as not enough; verify that a
fileChangeevent actually appears. - After context compaction, send a small recovery prompt that asks for only one file or one test chunk.
- For large WIP code edits, native GPT/Codex still appears more reliable.
Activity
0disoft commentedon Jun 22, 2026
Additional exact Codex App error from the failed code-edit turn:
This appeared after the assistant had already streamed commentary saying it was about to edit files, but before any
fileChangeevent was emitted. The Codex App UI showed reconnect attempts up to5/5, then the turn failed.A later smaller retry in the same thread succeeded and emitted a
fileChangeevent. That makes the failure look specifically tied to the Responses stream closing without the terminalresponse.completedevent around the commentary -> tool/fileChange transition.0disoft commentedon Jun 22, 2026
Additional runtime note from the local Windows repro/debugging setup:
The proxy instability was also accompanied by native Bun crashes on the current stable Bun release I was using (
1.3.14, latest stable release shown by GitHub at the time I checked). The crash is a Bun-level segmentation fault, not a normal JS exception from opencodex.I filed that separately upstream: oven-sh/bun#32585
Local evidence:
Another run reported a much higher peak before crashing:
For now my local watchdog prefers
C:\Users\cherr\.bun-canary\bin\bun.exewhen present (1.4.0in my environment) and falls back to stable Bun. I would treat this only as a local workaround/debugging note, not as a recommendation for opencodex to depend on canary Bun by default.lidge-jun commentedon Jun 22, 2026
Update from the provider-side investigation:
I added a first-class Umans AI Coding Plan preset on
devusing the Anthropic Messages wire format, not the OpenAI Chat Completions path.The configured provider shape is now:
{ "adapter": "anthropic", "baseUrl": "https://api.code.umans.ai", "authMode": "key", "defaultModel": "umans-coder" }Runtime behavior covered by tests:
POST https://api.code.umans.ai/v1/messagesx-api-key, notAuthorization: Beareranthropic-version: 2023-06-01is sentocx_wire prefix and stripped before tool calls are returned to CodexRelevant commits on
dev:f4b270b—feat: add Umans provider preset0a3a7f7—chore: trim umans devlog whitespaceI cannot run a live end-to-end Umans verification myself because I do not currently have an active Umans subscription/API key. Keeping this issue open for now. If anyone with Umans access can test the new preset and report whether the streaming duplication / commentary-before-fileChange stall still reproduces on the Anthropic Messages path, that feedback would decide whether this issue can be closed or whether we need to continue investigating the Responses/SSE bridge separately.
0disoft commentedon Jun 22, 2026
Tested the new
devUmans preset with an active Umans key.Local setup used for this test:
Results:
/v1/responsessmoke succeeded./v1/responsessmoke also succeeded and emitted the terminal event correctly.umans/umans-glm-5.2succeeded twice:fileChangeadd eventfileChangeupdate eventstream closed before response.completedfailureSo at least for a small file-edit workflow, the new Umans Anthropic Messages path did not reproduce the commentary-before-fileChange stall. This is not yet a heavy/stress reproduction, but it is a positive live E2E result for
umans/umans-glm-5.2on the new preset.lidge-jun commentedon Jun 22, 2026
Thanks for testing this with an active Umans key. This is a useful positive signal.
What this confirms so far:
umanspreset is actually usable with the Anthropic Messages path/v1/responsescompletes/v1/responsesemitsresponse.completedand[DONE]fileChangeI will keep this issue open for now because the original report involved larger/WIP code-edit turns and context-heavy sessions, and this first verification was intentionally a small smoke test.
Suggested close criteria:
response.completedfileChangeeventsIf those hold, I think we can close the Umans-provider-protocol part as fixed by the Anthropic Messages preset. If the issue still reproduces under heavier load, the next investigation should move away from the Umans provider config and toward the generic Responses/SSE bridge, terminal event handling, or the Windows/Bun runtime crash path noted above.
lidge-jun commentedon Jun 22, 2026
Closing this based on the positive live Umans smoke result on the new Anthropic Messages preset.
The fix is on
devand will be included in the upcoming main merge / release. If this or a related streaming/fileChange problem reappears after the release, please open a fresh issue with the new logs and reproduction details so we can track it separately from the original Umans provider-protocol mismatch.fix(devin): report the context windows Cognition actually serves (#4323)
fix(devin): replay the assistant's reasoning instead of dropping it (#…
fix(devin): preserve the catalog image-support flag as a tri-state (#…
fix(devin): report the context windows Cognition actually serves (lid…
fix(devin): replay the assistant's reasoning instead of dropping it (l…
fix(devin): preserve the catalog image-support flag as a tri-state (l…
fix(devin): never replay a Claude signature, and pin the signature-on…
fix(devin): carry reasoning signatures across turns
fix(devin): never replay a Claude signature, and pin the signature-on…
fix(devin): carry reasoning signatures across turns
fix(devin): never replay a Claude signature, and pin the signature-on…
fix(devin): carry reasoning signatures across turns
fix(devin): never replay a Claude signature, and pin the signature-on…
fix(devin): carry reasoning signatures across turns (carry #6116) (#6184