# fix\(server\): Claude background-task wakes start when the queue is held · PR \#17885 · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/pull/17885)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

State: open

Source repository: Unavailable fork

Source branch: fix/wake-continuation-held-queue

Target branch: main

Head commit: ea3642a4872efa089663fff337bd6283c52e17be

[Discussion and reviews](https://git.cafe/pingdotgg/t3code/pull/17885)

[Commits](https://git.cafe/pingdotgg/t3code/pull/17885/commits?format=markdown)

[Files changed](https://git.cafe/pingdotgg/t3code/pull/17885/diffs?format=markdown)

## Description

---

## Problem

A Claude wake queued while a run was settling inherited an older user-message hold. The wake never started, leaving the adapter wake latch occupied; later native subagents could remain Running after completion. Reproduced on Linux with the real web dev server and Claude Sonnet 5.5: queue a follow-up, Stop, then use CLI messages to arrange a background completion during another run's settlement.

## Change

Select eligible unheld queued runs in the orchestrator and both projection stores. Buffered provider wakes can bypass an older hold unless Stop has reached the active run; held user work and failed workspace preparation retain their holds. Mark Codex background-command continuations as `message_text`, because starting those sends a fresh prompt and must obey the hold.

Preserves the existing contributor commits and merges main into this PR; no new state or client contract changes.

## Scope and approval

Fixes https://github.com/pingdotgg/t3code/issues/22033

GitCafe: https://git.cafe/pingdotgg/t3code/issues/22033

Triaged bug via the automated issue flow. This is the existing focused scheduler fix confirmed by the reporter; no additional capability or option is introduced.

## Verification

Verified local head [ea3642a487](https://github.com/pingdotgg/t3code/commit/ea3642a4872efa089663fff337bd6283c52e17be), with main [27e0c684c5](https://github.com/pingdotgg/t3code/commit/27e0c684c585f955252d65f06206dd11a143bff5) merged.

- [Exact-base red](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/c5e103b59ce8db29/exact-base-red.log): regression fails because the provider wake is held. [Exact-head green](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/2f1fe5089093260f/exact-head-green.log): same test passes.
- [Six exact-head controls pass](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/a1697b6f91f0ab41/focused-controls.log): Stop window, failed/interrupted workspace preparation, and fresh-text delivery. The regression also checks held server text and user work remain held.
- Scoped suites passed (309 tests); `vp run check:changed 27e0c684c5` passed format, lint, knip, GraphQL, scoped typecheck and 269 overlapping tests. These aggregate logs are supplementary: they lack start/end SHA markers. [Logs and provenance](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/855fb0736961017d/evidence-index.md).
- Two isolated code reviewers found no blocking defects. [Proof audit pass 2](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/860162c42caf2311/proof-audit-pass2.md) found the evidence sufficient for this held-wake route.

Server-only change; changed visual matrix is empty. Real application environment: fs-27 Linux, isolated development state, web client 1280×800, Claude CLI 2.1.303 / Sonnet 5.5, no injected frames or stubs.

| Before — main 27e0c684c5 | After — ea3642a487 |
| --- | --- |
| [Runtime transcript](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/f2c8b4b46215655e/runtime-before.txt): wake 4 stayed queued/held; native agent remained Running after its final notification. | [Runtime transcript](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/1e3b279cb1a132c5/runtime-after.txt): wake 4 completed, original user run 2 stayed held, the same native agent completed with `PROBE_22033_OK`, and completion wake 6 completed. |

[Evidence index](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/855fb0736961017d/evidence-index.md) · [Extraction script](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/12da0485af27d7c9/extract-runtime.py) · [Original proof matrix](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/8e72424050fa5515/proof-matrix.md).

Limits: native Stop-window, Codex command-completion/release and workspace-failure controls were not run; their service-level controls are automated. The changed Codex command-completion delivery field has no direct adapter assertion after main deleted its former test. No separate desktop/mobile/provider runtime verification is claimed. Persisted wakes already held before upgrade remain held; a wake arriving after Stop reaches the active run remains held, with latch release on cancellation tracked separately in [#17109](https://github.com/pingdotgg/t3code/pull/17109).

Models and harness: Claude Opus 5.5 and GPT-6.1 Sol via T3 Code (Claude Agent and Codex).

