Repository navigation
Description
Summary
codex app-server still disconnects remote-control clients mid-turn with disconnecting slow connection after outbound queue filled on codex-cli 0.147.0 (and the same code exists on current main and rust-v0.148.0-alpha.5). This is the same symptom as #18203, which was closed as fixed by #19246 — but that PR only raised the WebSocket writer buffer. The per-connection outbound message channel that actually triggers the disconnect is still 128 messages, so the bug is unfixed.
Environment
- codex-cli 0.147.0 (standalone package, Linux x86_64)
codex app-serverwith remote control enabled; phone + desktop apps connected through the chatgpt.com relay (wss://chatgpt.com/backend-api/wham/remote/control/server)- model routed through a local OpenAI-compatible proxy (
opencode-go/deepseek-v4-flash,reasoning_effort=max)
Root cause
CHANNEL_CAPACITY is still 128 (verified identical on main, rust-v0.147.0, and rust-v0.148.0-alpha.5 as of 2026-08-07):
// codex-rs/app-server-transport/src/transport/mod.rs (line 25)
pub const CHANNEL_CAPACITY: usize = 128;Disconnect path unchanged (codex-rs/app-server/src/transport.rs):
if connection_state.can_disconnect() {
match writer.try_send(queued_message) {
Ok(()) => false,
Err(mpsc::error::TrySendError::Full(_)) => {
warn!("disconnecting slow connection after outbound queue filled: {connection_id:?}");
disconnect_connection(connections, connection_id)
}
...Reproduction
Run two threads concurrently so both stream reasoning deltas to one remote-control connection (each max-effort thread can emit hundreds of events/sec; relay latency lets the 128-slot queue fill). The app-server then kills the client:
20:23:28 WARN transport | disconnecting slow connection after outbound queue filled: ConnectionId(25)
20:23:28 WARN transport | dropping message for disconnected connection: ConnectionId(25)
20:23:28 INFO client_tracker | forwarding remote control connection closed transport event connection_id=ConnectionId(25)
Both the phone and desktop apps show "connection lost"; the thread keeps running server-side but the client session is dropped.
Expected behavior
A slow-but-alive client should not be disconnected because of a burst. The outbound queue should be sized for streaming workloads, or the writer should apply backpressure (await send) and only disconnect after a timeout.
Suggested fix
- Raise
CHANNEL_CAPACITYfor remote-control connections (the WebSocket writer buffer was raised to 64K in Increase app-server WebSocket outbound buffer #19246), or - Replace
try_send+ immediate disconnect with async backpressure plus a disconnect timeout.
References
- App-server disconnects remote TUI mid-turn when outbound queue fills (128 messages) #18203 (original report, closed 2026-04-24)
- Increase app-server WebSocket outbound buffer #19246 (merged "fix" that missed this code path)
- Evidence comment on App-server disconnects remote TUI mid-turn when outbound queue fills (128 messages) #18203: App-server disconnects remote TUI mid-turn when outbound queue fills (128 messages) #18203 (comment)
Activity
niklassheth commentedon Aug 9, 2026
I'm experiencing this issue, it's incredibly frustrating because every time the connection drops my side chats expire.
jdcodes1 commentedon Aug 18, 2026
Verified on
main(1f41cc5): both halves of the analysis hold.CHANNEL_CAPACITYis still 128 (app-server-transport/src/transport/mod.rs#L25, re-exported into the app-server), and the disconnect path is byte-identical —try_send→TrySendError::Full→ immediatedisconnect_connection(https://github.com/openai/codex/blob/1f41cc5d92/codex-rs/app-server/src/transport.rs#L156-L163). So #19246 enlarged the layer below the one that kills the connection; the mpsc hop above it still hard-drops at 128, and two max-effort reasoning streams through a relay can outrun that trivially.Beyond raising the constant, the structural issue is that disconnect is the only overflow policy. For a remote-control observer, the queue is full of deltas whose value decays instantly — the correct degradation is coalescing/shedding, not connection teardown: drop oldest delta messages (never lifecycle/completion events) when full, or collapse consecutive deltas for the same item into the latest one. That bounds memory identically while making slow relays lossy-but-alive — a phone missing some reasoning frames is fine; a phone being disconnected mid-turn (then re-syncing everything) is both worse UX and more total bandwidth. A capacity bump alone just moves the cliff; the reproduction with two concurrent threads will find any fixed constant.
charles1w commentedon Sep 7, 2026
Windows confirmation (desktop 26.901.4073, Sept 5–7): captured 17
disconnecting slow connection after outbound queue filledevents, each followed by the same remote client's closure 0.1–1.4 ms later. RustDesk remained responsive during observed Codex Remote drops. In 16/17 incidents there was no host-relay reconnect within ±35 seconds; independently, both IPv4/IPv6 probes passed around 16/17.The confirmed immediate failure is per-client queue overflow triggering connection teardown. Likely trigger: streaming bursts outrunning relay/client consumption; writer or acknowledgement stalls remain possible but unmeasured. Queue occupancy, drain rate and ACK latency would distinguish these. This supports fixing backpressure/overflow handling rather than resetting host networking.
These captures predate 26.901.6511; that build has not been revalidated.
charles1w commentedon Sep 10, 2026
Follow-up to my earlier Windows queue-overflow confirmation: the persistent inability to reconnect had an additional, separately reproduced cause: slow
thread/listscanning. This does not establish what originally filled the outbound queue.On app-server
0.153.4, Android's list request omitsuseStateDbOnly, causing the host to parse huge subagent histories before excluding them. Controlled listing exceeded 25 seconds; early exclusion returned the same 50 tasks in 1.15 seconds (indexed: 27 ms).A live workaround preserves old histories via retained NTFS files and read-through links that the scanner skips. Task loading now takes 1.21 seconds and the phone connects; no app restart or manual network reset. The code-level remedy is indexed Remote bootstrap and source filtering before preview parsing.
Sanitized reproduction and workaround details. The previously captured queue-full disconnects remain valid and require their own fix.
arkycop commentedon Oct 3, 2026
Fresh Windows-to-macOS confirmation on 0.159.0-alpha.12.1: command-output bursts coincide with queue-full disconnects
Adding sanitized evidence from October 3, 2026 (UTC). This reproduces the queue-overflow disconnect mechanism described in this issue on a newer bundled app-server and a Windows Codex App host with macOS Codex remote projects.
Environment and impact
codex-cli 0.159.0-alpha.12.1.26.930.2377.0; Microsoft Windows NT 10.0.26300.0, x64.26.930.21537; macOS27.2, Darwin27.2.0, ARM64.Correlated failures
All times are October 3, 2026, UTC.
item/commandExecution/outputDeltaitem/commandExecution/outputDeltaRepresentative Windows native messages:
The macOS desktop log then records close code
4000with reason:The installed macOS app sends a logical stream heartbeat every 30 seconds. An unknown-stream pong causes this close and a scheduled reconnect, explaining why the visible Mac drop can lag the Windows queue-full event.
Measurement and source boundary
Windows native SQLite logs were read in read-only mode with short-interval polling. Outgoing notification records were classified by protocol method and grouped by native second/nanosecond timestamps. These are app-server notification counts, not console-line or byte counts. Counts cover the server's logged outgoing notifications; they do not independently prove every counted notification targeted the disconnected client. The transport warning separately establishes that the client's outbound queue filled.
The official source tag matching the installed bundled CLI still has:
This establishes the disconnect mechanism and strongly implicates command-output bursts. Live relay acknowledgments and sustained packet timing were not captured, so acknowledgment latency, network latency, or another drain-rate defect may also contribute. Matching the published version tag is not a byte-for-byte binary verification. Other historical sequence-gap and pong-timeout failures are not assigned this cause.
Checks and mitigation
Expected behavior and request
A burst of command output should not repeatedly tear down an otherwise live remote project connection. Please investigate bounded backpressure/overflow handling that preserves required response and lifecycle events, along with queue occupancy, drain-rate, and relay-ACK diagnostics. The practical output-capture workaround is useful, but users should not have to control normal command verbosity to keep the desktop remote connection alive.
This report intentionally excludes usernames, hostnames, internal addresses, account/enrollment identifiers, project names, conversation content, credentials, and full raw logs.
Follow-up: October 3 morning recurrence
The workflow mitigation has not eliminated the client symptom. Account-wide output-capture guidance remained installed on both macOS and Windows, and the app/CLI versions were unchanged. The Windows desktop app-server remained alive. Mac logs recorded two further code-4000 closes with reason
remote control app-server stream became unknownat 2026-10-03T15:22:46.564Z and 15:27:17.882Z. A separate authenticated-workspace-change close preceded a Mac app restart around 15:21 UTC; it is not counted as a transport failure.No matching Windows queue-full warning was recovered for these two morning events, so they are not proven to have the earlier overflow cause. A subsequent 15:28:20.449–15:28:58.514 UTC sample recorded 1,051 command-output notifications, peaking at 228 in a 100-ms bucket, without a transport warning. A further 15:34:46.850–15:37:46.945 UTC capture recorded 146 agent-message deltas, no commandExecution/outputDelta notifications, and no transport warning or closure; the Mac also recorded no additional remote closes through 15:43:11 UTC.
The earlier timestamp-correlated queue-overflow evidence remains valid. These later observations establish that output-capture guidance is only a partial workaround, while leaving the specific cause of the morning reconnects unclassified. A deterministic burst/slow-ACK reproduction and transport diagnostics are still needed.
krotname commentedon Oct 21, 2026
Additional Windows evidence on the unmodified bundled
codex-cli 0.163.0-alpha.10.2, collected on 2026-10-21. Source-side output capture greatly reduced notification load, but this does not establish that Remote disconnects are fixed.Two production queue-full events
The following excerpts are from primary App Server logs. Hosts and connection identifiers have been anonymized; timestamps are UTC.
The same connection was closed 95 microseconds and 1.890 milliseconds, respectively, after its queue-full warning. Both events came from the working desktop App Server, not the isolated test servers below.
Around Host A's event, a 10-second window contained 454 outgoing notification trace entries, including 446
item/commandExecution/outputDelta; one 100 ms bucket contained 352 output deltas. The affected connection also submitted 100 filesystem/history RPCs before the warning: 59fs/getMetadata, 32fs/readDirectory, 9thread/items/list. A contemporaneous command already hadmax_output_tokens=2500; its retained tool result was only 204 lines / 10,032 characters. A final-result token limit therefore did not prevent the observed output-notification burst.Around Host B's warning (±5 seconds), there were 451 output-delta trace entries, with a maximum of 178 in a 100 ms bucket. These are server-wide fan-out trace counts, not measured queue occupancy or proven per-recipient counts. The logs do not identify the recipient/item for each delta or establish why that connection's writer fell behind. Concurrent activity prevents assigning the overflow to one command with confidence.
Controlled source-output mitigation test
On the same unmodified bundled binary, I used an isolated loopback WebSocket App Server with an empty temporary
CODEX_HOME, an ephemeral protocol fixture, andthread/shellCommand. This exercised the actualitem/commandExecution/outputDeltanotification, not justcommand/exec/outputDelta.Each run produced 8,781,824 bytes using 131,072 small stdout writes, while submitting 100
fs/getMetadataRPCs. The client paused application reads for one second; its receive buffer was reduced for the test. Three runs per variant:The capture helper drains stdout/stderr into separate files, caps each saved stream at 48 MiB, and emits one JSON summary of at most 6,144 UTF-8 bytes after completion. The controlled runs used a 256-byte excerpt budget per stream. It preserves the child's exit code and explicitly reports timeout, truncation and incomplete capture. All three captured runs retained the full synthetic stdout, exited 0, and passed a post-load RPC readback. No Codex executable, desktop bundle or running service was patched or restarted.
Neither test variant disconnected. This demonstrates notification-load reduction, not reproduction of the production overflow or proof that the underlying defect is fixed. The loopback test also does not reproduce the hosted Remote relay.
Live check and coverage limits
A later wrapped command ran on the working desktop from 14:09:47.200 to 14:10:19.671 UTC, retained the same 8,781,824 bytes, and completed with exit 0 and complete capture. Native Remote reads of an existing chat succeeded during and after that command.
Fresh primary-log capture on the second production host covered 14:09:49.886–14:10:56.057 UTC (33 polls, 21 matching new records, last matching source record at 14:10:44.531). It overlaps the first host's bounded capture, 13:57:13.558–14:12:14.688 UTC (447 polls, last matching source record at 14:12:09.866). Poll spacing was at most 2.372 seconds; the two clocks were compared before the tests, with the best sample estimating a +13 ms offset and ±18 ms round-trip uncertainty. No queue-full/pong-timeout/sequence-gap/stream-unknown event was found in the later overlapping live-check interval.
However, Host B's 13:58:55 overflow occurred during the broader observation, before the final two-host deployment verification. The mitigation is an explicit command-execution wrapper/rule, not transparent interception of every existing agent or every notification type. An earlier remote sampler ended prematurely when its WinRM session closed; an isolated-test sampling interval had no fresh production records. Neither is counted as continuous healthy coverage. Long-term disappearance of the disconnects remains unproven.
peetronicus commentedon Oct 25, 2026
FIX! - Deterministic Remote relay reproduction, two isolated causes, and an experimental byte-preserving fix (Windows, 0.164.0-alpha.11.1)
Adding a self-contained reproducer to advance the earlier burst/flow-control reports. The unmodified bundled host disconnects with just a 51,800-byte synthetic file and 25 ms of simulated relay ACK delay. The same-version experimental build delivers the exact full output without disconnecting. A separate metadata-only case reproduces a closed logical client's retained replay window blocking the next client.
This is an issue/evidence submission in accordance with the contribution policy, not an external PR. The experimental patch below documents the local change used to test the hypotheses; upstream may prefer a different implementation.
Versions and scope
10.0.26300.OpenAI.Codex 26.1021.3705.0; unmodified bundled native host:codex-cli 0.164.0-alpha.11.1.rust-v0.164.0-alpha.11.1, commit6905ecede7816e91373e9eabda3f6b0368fc747b, with the patch below. This is not a test of currentmainor a byte-for-byte reproduction of OpenAI's build process.3.14.0,aiohttp 3.13.2, PowerShell 7. Rust1.99.1, MSVC x64, existing fullreleaseprofile with thin LTO.CODEX_HOME, file-backed synthetic credentials, an ephemeral loopback HTTP/WebSocket relay, and a deterministic local Responses SSE stub that requests oneexec_command. No real account credentials or paid model inference are required. Mock HTTP requests to/v1/responsesare local fixture traffic, not actual model calls.Controlled stock-versus-experimental results
These five cases were run using the portable script included below, against the two native executables of the same reported version:
Get-Content, relay ACKs delayed 25 msBoth fragmented-output commands complete locally with exit code 0 and the full 51,800-byte captured result. On stock, the remote observer loses the result despite successful execution. The full-output SHA-256 is:
0caaface4f99e8d2919b6b31766c5d8ee31d973e6c266097ad9819df5172f997The stock failure emits:
The new client stall in the metadata-only case is not reported as another queue-full disconnect: it reproduces separately, without starting any agent turn or shell command.
Reproduce without a real account or model
remote_control_repro.py.aiohttpinstalled (python -m pip install aiohttp==3.13.2) and PowerShell 7. Run this from an ordinary local shell. The fixture starts subprocesses and loopback servers; it is not intended to run inside another restrictive command sandbox.--codexat an unpacked executable directory with its matching helper executables, or the installed stock host. It never connects to the already-running desktop server or changes its real profile.Expected distinguishing fields:
queueWarnings,commandTimedOutWaitingForResponse: true, butlocalCompletion.exitCode: 0and all 51,800 local bytes. Exact fragment counts/timing may vary with scheduling; the measured run is recorded below.queueWarnings, full matching received SHA-256, completed turn.envelopesBeforeSecondClient: 128,secondInitBeforeOldAcksReleased: false, thensecondInitAfterOldAcksReleased: true. The script intentionally releases old ACKs after measuring the stall.secondInitBeforeOldAcksReleased: true.The synthetic login and permissive command policy belong only to each disposable fixture profile. The command reads the generated fixture; it is not a production sandbox-policy recommendation. The mock's ACKs represent the relay's application ACKs, not TCP ACKs or user interaction on the phone.
Source analysis and experimental change
Read-fragment-to-notification amplification. Small stdout reads become output events. With the shared remote replay window at capacity, the WebSocket writer stops taking queued envelopes; the app-server's bounded
try_sendcan then disconnect the logical connection. Permanently missing ACKs are not necessary: the controlled reproduction uses only 25 ms delay. The bulk-output control isolates message fragmentation from byte volume.The local experiment coalesces adjacent output into bounded 8 KiB batches with an absolute 10 ms deadline after the first byte, at the pipe/legacy reader and unified-exec watcher. The deadline is per stage, not an asserted 10 ms end-to-end bound. Idle readers do not spin on periodic timers. It preserves bytes, EOF flushing, pending bytes before later I/O errors, draining after receiver closure, and existing UTF-8 framing. It does not drop output or lifecycle messages, raise the 128-entry transport capacity, or require users to wrap/reduce their commands.
Closed-stream ownership of replay capacity. Retiring a logical client stream did not release that stream's buffered unacknowledged envelopes. A new client on the same WebSocket can therefore wait for ACKs belonging to an already-closed stream, even with no agent running.
The local experiment discards only the retired
(client_id, stream_id)replay entries and adjusts window usage. Queued envelopes carry the logical stream's existing cancellation token; the writer checks it under the buffer lock before insertion, preventing already-retired queued work from refilling the window. Active streams retain their replay data. The legacy close path resolves its stream ID before removing the tracker entry. Late ACKs must not decrement released slots twice.Relevant upstream sources: pipe reader, legacy exec reader, unified watcher, overflow handling, remote replay window, client tracker.
Other focused checks on the experimental build
command/execoutput deliver 59,995 exact UTF-8 bytes each, including a multibyte character crossing an 8 KiB boundary; no queue-full warning. That original-fixture run received 9 and 8 output notifications respectively. SHA-256 for each:e5650c9f0e22c903680903bf0059cf25e23fa50a1bc298404c74d9a97a579825.ClientRequest,ServerNotification,ServerRequest, and combined v2 JSON schemas are identical to those generated by the installed stock host.code_mode_hostandprefer_mxcflags and the matching unchanged stock helpers.For the patch experiment, save the second expandable section as
experimental.patch, apply it at the release checkout's repository root, and build normally:The published release lockfile used
0.0.0workspace package versions. Our build refreshed those workspace version entries only; no third-party dependency versions were changed relative to the release. That generated lockfile metadata diff is omitted from the experimental patch. The only test-dependency feature addition istokio/test-utilfor deterministic reader-time tests.Live corroboration and limits
Before patching, a controlled 700-line read on the actual Windows desktop host
0.163.0-alpha.11.2produced 1,397 outgoing command-output trace records in a 284 ms command window, a native queue-full disconnect, and an observed Android reconnect. A bulk read of the same file produced 8 records without that failure. At a TCP sample 8 ms after the warning, the active burst socket had zero current application-write and retransmission queues; this is evidence against a permanently stuck TCP send buffer at that sampled instant, not a measurement of relay ACK latency.After selecting the same-version experimental
0.164.0-alpha.11.1host and verifying its executable hash, repeating the live 51,800-byte check produced 8 output trace records including setup output, with zero queue-full warnings. Live trace records are server-wide notification logs, not proof of per-recipient queue occupancy. The isolated relay results above count messages actually received for the synthetic logical client.This supports the two reproduced mechanisms and the tested experimental correction. It does not establish that every idle reconnect, unknown-stream close, pong timeout, or network fault has these causes, or that the global active-client overflow policy is fully solved for every notification family. The 128-entry capacity and genuine-full disconnect policy remain unchanged in this experiment. Long-term production stability has not yet been established.
The script, patch and compact measured receipts are included inline so this report does not depend on access to private logs, a personal repository, credentials, screenshots, or downloadable native binaries.
Measured executable SHA-256 values:
1103e9e09c71fa2cd0afd6d8f3b9a2d63174fe8efd7cb5bd09f1cb14ef58a0982701b5d42d854e42bccd9fb72f1031c22fd5324ab785f8aa66ea0f09fc59c722Portable loopback reproducer: remote_control_repro.py
Experimental patch used to verify the two mechanisms
Compact measured stock / experimental receipts from the portable script
[ { "comparisonCase": "stock-burst-25ms", "ackDelaySeconds": 0.025, "outputNotifications": 256, "outputBytes": 9694, "expectedOutputBytes": 51800, "expectedOutputSha256": "0caaface4f99e8d2919b6b31766c5d8ee31d973e6c266097ad9819df5172f997", "outputSha256ByClient": { "synthetic-client": "344daf44ba81e34add63cc539f98bcc114783ace93b44cc85a55da7b11624eea" }, "queueWarnings": [ "{\"timestamp\":\"2026-10-25T02:06:05.872103Z\",\"level\":\"WARN\",\"fields\":{\"message\":\"disconnecting slow connection after outbound queue filled: ConnectionId(1)\"},\"target\":\"codex_app_server::transport\"}" ], "commandTimedOutWaitingForResponse": true, "localCompletion": { "status": "completed", "exitCode": 0, "bytes": 51800, "sha256": "0caaface4f99e8d2919b6b31766c5d8ee31d973e6c266097ad9819df5172f997" } }, { "comparisonCase": "fixed-burst-25ms", "ackDelaySeconds": 0.025, "outputNotifications": 7, "outputBytes": 51800, "expectedOutputBytes": 51800, "expectedOutputSha256": "0caaface4f99e8d2919b6b31766c5d8ee31d973e6c266097ad9819df5172f997", "outputSha256ByClient": { "synthetic-client": "0caaface4f99e8d2919b6b31766c5d8ee31d973e6c266097ad9819df5172f997" }, "queueWarnings": [], "localCompletion": { "status": "completed", "exitCode": 0, "bytes": 51800, "sha256": "0caaface4f99e8d2919b6b31766c5d8ee31d973e6c266097ad9819df5172f997" } }, { "comparisonCase": "stock-retired-128", "ackDelaySeconds": null, "outputNotifications": 0, "outputBytes": 0, "expectedOutputBytes": 51800, "expectedOutputSha256": "0caaface4f99e8d2919b6b31766c5d8ee31d973e6c266097ad9819df5172f997", "outputSha256ByClient": {}, "queueWarnings": [], "agentThreadsStarted": 0, "shellCommandsStarted": 0, "metadataResponses": 126, "envelopesBeforeSecondClient": 128, "secondInitBeforeOldAcksReleased": false, "secondInitAfterOldAcksReleased": true, "secondInitAfterReleaseMs": 1 }, { "comparisonCase": "fixed-retired-128", "ackDelaySeconds": null, "outputNotifications": 0, "outputBytes": 0, "expectedOutputBytes": 51800, "expectedOutputSha256": "0caaface4f99e8d2919b6b31766c5d8ee31d973e6c266097ad9819df5172f997", "outputSha256ByClient": {}, "queueWarnings": [], "agentThreadsStarted": 0, "shellCommandsStarted": 0, "metadataResponses": 126, "envelopesBeforeSecondClient": 128, "secondInitBeforeOldAcksReleased": true, "secondInitAfterOldAcksReleased": true, "secondInitAfterReleaseMs": 0 }, { "comparisonCase": "stock-bulk-500ms", "ackDelaySeconds": 0.5, "outputNotifications": 8, "outputBytes": 51800, "expectedOutputBytes": 51800, "expectedOutputSha256": "0caaface4f99e8d2919b6b31766c5d8ee31d973e6c266097ad9819df5172f997", "outputSha256ByClient": { "synthetic-client": "0caaface4f99e8d2919b6b31766c5d8ee31d973e6c266097ad9819df5172f997" }, "queueWarnings": [], "localCompletion": { "status": "completed", "exitCode": 0, "bytes": 51800, "sha256": "0caaface4f99e8d2919b6b31766c5d8ee31d973e6c266097ad9819df5172f997" } } ]timbuilt-db-tim commentedon Oct 30, 2026
Retired-stream replay stall independently reproduced on stock Windows0.165.0-alpha.1.2
Following the metadata-only reproduction in #37526 (comment), I independently tested the installed unmodified Windows desktop app-server0.165.0-alpha.1.2. This adds a newer-runtime confirmation of the retired-stream replay case, not a test of the experimental patch or a claim that all live Remote Control failures share this cause.
Two isolated runs used fresh temporary CODEX_HOME profiles, file-backed synthetic login, and an ephemeral loopback-only mock backend/relay. No real credentials, paid inference, agent turns, shell commands, or production enrollment were used. The published harness was adapted for hidden Windows child launch, restricted inherited environment, retained fixtures, exception-safe cleanup, and per-stream/generation observations. Both diagnostic children exited normally.
Each run used exactly one WebSocket generation. Both initialize responses were error-free. All retained entries at retirement belonged to the old synthetic client/stream. No outbound-queue-full warning occurred. The saturated case delivered126 metadata responses plus initialization/status envelopes before retirement; no command output or large history was involved.
The timed observation alone does not establish an infinite stall. Together with the low-occupancy control, controlled ACK release, exact retired-stream occupancy and the source's global receive gate, it reproduces the retired replay-capacity coupling without a reconnect confound.
The inspected websocket.rs blob is d74d3dfd8a4d5e19616bfac256f9e093e1ee7bc2, identical in current main and public rust-v0.166.0. This is a source comparison; the0.166 binary was not tested. No experimental build or live repair was installed.
Please consider the narrow retired-stream cleanup described in the earlier comment: release the retired stream's replay slots, prevent canceled queued work from refilling them, preserve active-stream replay and byte delivery, and handle late ACKs without double accounting. Is there a planned vendor fix or supported diagnostic for correlating live stream retirement with retained replay occupancy? Active work must remain running during diagnosis.
Private identifiers, transcripts, paths, addresses, account data and credentials are intentionally excluded.
JeremiahG88 commentedon Nov 22, 2026
iOS voice session closes mid-sentence when the Windows host drops the phone for a full outbound queue (0.169.0-alpha.11.1)
Fresh confirmation on a newer bundled runtime, with one user-visible consequence not yet described in this issue: an active realtime voice session on the iPhone ends with it. The voice screen closes mid-sentence and the user is returned to the text chat. Seen once in ordinary use with the log row captured, then reproduced twice on demand with a control. Identifiers are removed throughout; timestamps are UTC.
Environment
OpenAI.Codex 26.1111.2228.0, bundled runtime0.169.0-alpha.11.1(thecli_versionrecorded in the app's session files). Running since 16 November 2026.powershell.exe -Command ..., as recorded for agent commands).What the user sees
During a voice conversation the assistant stops mid-sentence, the whole voice screen closes and the phone shows the same chat as text. The app stays open. Voice has to be started again. The agent task itself keeps running on the host and completes.
Host log, one event in ordinary use (21 November 2026)
So the order is: queue-full disconnect of the phone's logical connection (2.5 s into a line-by-line command output), the call torn down from the phone side about 10 s later, the host's sideband giving up about 23 s after that.
Reproduced on demand, one factor varied (22 November 2026)
One new voice chat started from the iPhone, the host log polled every two seconds for the whole test so that no row could be pruned unseen. The only thing varied was how the agent printed a text file.
Get-Content <file>in Windows PowerShell 5.1 (41,194 characters, 369 lines), asked for twice:2 of 2 with line-by-line output, 0 of 5 requests (14 prints) with block output, same chat, phone and network, minutes apart. Two shapes of the same failure follow from it: with an agent turn still running, the call is reset about 10 s after the disconnect and a close record follows (first event above); with the chat idle, the instance is shut down 4 to 15 s after the disconnect and the voice session gets no close record at all.
For comparison, a voice session the user ended on the phone a minute later, with no command running and no queue-full row, shows on the host as the same
Connection reset without closing handshakefollowed by a close record about 23 s later. So the session record of a dropped voice session and of one the user ended are the same.Log retention during this test: a normal read of
logs_2.sqlite60 and 100 seconds after the two WARN rows no longer contained either of them.Scope on the first day (the app's session records, which are not pruned)
Get-Content, a recursive listing, a search piped through a cmdlet). Their transport log rows were no longer retained when read (see "Log retention"), so they are consistent with the same cause, not confirmed.Fragmentation measured on the host (same 49,353-byte, 431-line file, 3 runs each, 8 KiB pipe reads)
Get-Content <file>(Windows PowerShell 5.1)Get-Content -Raw <file>Get-Content <file> | Out-Stringcmd /c type <file>Windows PowerShell writes redirected output through a 256-character console writer and one write per line plus one per newline, so even a single string is split into more than a hundred writes. This is the "read-fragment-to-notification amplification" described in the 25 October comment above, on the stock shell of a Windows host.
Source check
At tag
rust-v0.169.0-alpha.11.1:CHANNEL_CAPACITYis 128 (app-server-transport/src/transport/mod.rs), andsend_message_to_connection(app-server/src/transport.rs) still doestry_sendand disconnects onTrySendError::Full. At the newest tag available on 22 November 2026 (rust-v0.173.0-alpha.4) the capacity and the disconnect path are unchanged andutils/pty/src/pipe.rsandcore/src/unified_exec/async_watcher.rsare byte-identical to the installed tag. Onmainatcf3ff1530d(22 November) the capacity and the disconnect path are also unchanged. So no released build contains a fix.Log retention (makes this hard to report)
logs_2.sqlitekept only about the last thousand process-level rows of the running app process: the 02:49:07 WARN row was present 25 minutes after the event and gone 5 minutes later, after one more voice session. The session.jsonlfiles keeprealtime_session_closedwithoutcome: "ended"for every kind of ending, including this one, so nothing durable distinguishes a dropped voice session from one the user ended.Requests
app_server::transportlonger than trace rows.