fix(gui): recover stale queued messages - #12
Merged
Merged
Conversation
Adopt T3's client-side queue and offer a lossless text recovery choice for provider queues stranded after a stopped turn.\n\nCo-Authored-By: Codex <noreply@openai.com>
resolveQueueRecovery opened a projection turn before its first send, and applyState reads running off projection.turnId. A transport failure on the very first recovered message left that turn open forever, so the thread reported running with nothing behind it and took no further input. sendTurn already guards the same shape; the new path did not. Failing on a later message is different: the earlier one started a real turn, so running is correct and the existing test covers that case only.
…e recovery work # Conflicts: # harness/t3-integration/test/bridge.test.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cc839c42, which includes upstream client-side queued messages from feat(web): queue messages sent client-side while the agent is working pingdotgg/t3code#11673isStreaming=false && pendingMessageCount>0state without silently clearing itWhy
The old desktop sent follow-ups directly into Pi while a turn was running. If that turn stopped before the provider drained its queue, T3 showed the session as ready while Pi still reported pending input, so later sends could hang indefinitely.
The upstream client queue prevents new occurrences. The bridge recovery prompt repairs already-stranded sessions without executing old input on attach or deleting it without a choice.
Verification
node --test harness/t3-integration/test/bridge.test.mjs— 27 passednode --test harness/t3-integration/test/*.test.mjs— 34 passed, 5 source-dependent tests skippedcc839c42overlay apply — passedgit diff --check— passedReview follow-up (this branch)
resolveQueueRecoveryopened a projection turn before its first send, andapplyStatereadsrunningoffprojection.turnId. A transport failure on the very first recovered message left that turn open forever: the thread reported running with nothing behind it and accepted no further input.sendTurnalready guards the same shape. Added the matching catch and a regression test — the pre-existing failure test fails on the second message, where a real turn is running and the hole does not show.node --test harness/t3-integration/test/bridge.test.mjs— 33 passed; the 2 failures need a local T3 source checkout and fail identically oncbb13a29anode --test harness/t3-integration/test/*.test.mjs— 40 passed, 5 skipped, same 2node --test harness/pi-server/test/restart-profile.test.mjs— 3/3 on macOSgit diff --check— passedNotes
Full journey and residual legacy-attachment limitation:
cycles/2026-09/wk3/09-15/1716-t3-queued-message-recovery-wrap.mdCI note
checkpointwas red on the isolated Pi server testrestart-profile.test.mjs(
reason: "no-pid"). That workflow only runs onpull_requestand on pushes tocodex/dual-runtime-checkpoints-20260913, so it has never run onrubato/baseand there was no base run to compare against. The failing test arrived with
40b620b5bon base two hours before this PR's run, and this PR changes noharness/pi-server/**.The cause is now fixed on base in
0cc633236:pgrep -llists the full commandline on BSD and only the process name on procps, so
-lfoutput that readsnode .../cli.mjs --agent-dir Xon macOS reads1234 nodeon Linux and nevermatches
cli.mjs.listenerPidnow takes pids frompgrep -fand reads eachcommand line with
ps. This branch has merged that base commit.