Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: A failed Claude wake dispatch leaves `requestedContinuations` set, so later wakes are dropped and their output never reaches the thread #28163

ClosedMichaelihc(GitHub profile, opens in a new tab) opened this issue 0 comments

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

Reconstructed from one incident on three threads, not reproduced deterministically.

  1. On a Claude thread, have the agent start a background Bash command and end its turn.
  2. While the thread is idle, make T3's database writes fail. A full disk did this here.
  3. Let the command finish, so Claude starts a wake turn. Its dispatch fails.
  4. Free the disk.
  5. Send a normal message and have the agent start another background command, then end its turn.
  6. Let that command finish.

Expected behavior

A failed wake dispatch is retried, or at least releases the wake latch. Once writes recover, the next wake opens a run, and the wake turn's output appears in the thread.

Actual behavior

One failed dispatch leaves requestedContinuations set, and every later wake on that CLI process is dropped silently. A user turn doesn't clear it.

The CLI still wakes and keeps working, but T3 has no run for that turn:

  • Its messages never reach the thread, including final reports and questions for the user.
  • A thread showing Waiting flips to Completed when the job exits, with no new message, while the agent is still working.
  • T3 tools fail with parent_not_active, so t3_background_wait can't register new jobs and those threads show Completed while a job runs.

This is the "Claude wake latch can still swallow later wakes while the CLI stays alive" part that was left open when #20430 closed. I found no issue tracking it.

Impact

Major degradation or frequent failure

Version or commit

Seen on 0.1.4-preview.20261028.3796. The same code is on main at 79f1fad, and the dispatch-failed handler is unchanged in v0.1.6.

Environment

Windows 11, desktop app, claudeAgent with claude-opus-5-5. The server ran continuously from 2026-10-29 with no restart during the incident.

Logs or stack traces

Timeline on 2026-10-31 (UTC), from provider event logs and statev2.sqlite:

TimeEvent
07:35:29Last wake run on any thread before the gap
07:36:32–37Background jobs finish on threads A, B and C. No runs are created
07:40:33An agent, in a hidden turn, measures 0 MB free on the drive
07:43:36First new run of any kind on any thread, an agent-sent message rather than a wake
07:48:48First wake run after the gap, on another thread. Other threads keep waking normally from then on
08:56:01Thread B: awaited job exits, wake turn runs, its final report is never recorded
12:53:18Thread A: same again, after 7 user runs since the latch was set. Run 28 registered the wait at 12:51

Across all threads with provider logs for that day:

  • result events outside any T3 run appeared on exactly these three threads: 11 on A, 5 on B and 2 on C.
  • Those threads had 53 working wake runs before the gap.
  • t3_background_wait failed 8 times in the hidden turns, each with {"code":"parent_not_active","message":"The calling provider no longer owns an active thread run."}.

Not confirmed here: the server traces from 07:36 have rotated away, so I don't have the dispatch-failed warning from this machine. The failed dispatch is inferred from the timing and the code. This comment on #20430 shows that warning in the same sequence on another machine, with a disk quota as the trigger.

Code at 79f1fad:

Possible fix, untested:

  1. Give Claude's offer a clearIfCurrent, and call it from the dispatch-failed handler for plain wakes.
  2. Retry transient failures, as delegated completions already do.
  3. Log when shouldOffer is false, since this failure currently leaves no trace.

Screenshots, recordings, or supporting files

None.

Workaround

Send any message in the affected thread after each background job exits. That opens a real run, so the agent's output appears and t3_background_wait works for that turn. Replacing the CLI process, for example by restarting T3, clears the latch but ends running background work.

  • #20430: same latch, trigger was a held queued run. Closed with this part left open.
  • #22033 and #17885: fix the held-queue trigger, not a failed dispatch.
  • #23006: parent_not_active in notification turns, the same symptom.
  • #15542: the run-ingestion side of a write failure.

Filed by Opus 5.5.

  1. tanstack-source added labelsbug

  2. juliusmarminge closed this

Sign in to join this conversation.