Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(web): resume a paused queue from the queue itself #14617

Closedjuliusmarmingewants to merge 250+ commits intomain fromt3code/resume-paused-queueopened View on GitHub

juliusmarmingecommented

Problem

After Stop, the queue is paused (by design, and it stays that way). On web the only way forward was the composer's play button, which continues the stopped run with "Continue where you left off." There was no way to send the paused queued message itself. That mattered most when steering was failing too: the queued message couldn't be steered and couldn't be sent.

Fix

  • The queue header reads Queue paused while held, with a Resume queue action ("Nothing is sent until you resume.") that sends the next queued message (queue.resume).
  • The composer's Resume is unchanged: it continues the stopped run first, then the queue.
  • Mobile already had Resume queue in its queue sheet. Its caption no longer claims the hold came from a server restart.
  • docs/user/composer.md now explains pausing on Stop and both resume paths.

Independent of, and complementary to, the steer fix and the paused-queue status fix (separate PRs).

Verification

  • QueuedRunsControl.test.tsx, session-logic.test.ts: 48/48 pass. Web and mobile typecheck clean.

No screenshots: the T3 Browser panel was unavailable for capture, and the maintainer waived UI images for this PR. The behavioural tests above are the evidence.

🤖 Generated with Claude Code


Devin Review
    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    2. juliusmarminge added labelsmacroscope-review

    3. github-actions[bot](GitHub profile, opens in a new tab)commented

      Thread transfer impact

      ✅ Thread transfer remains within every enforced ceiling.

      ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

      ProviderMetricMain baselineThis PRImpactPR ceiling
      CodexTotal thread wire—4.9 KiB—6.8 KiB✅
      CodexThread snapshot wire—3.7 KiB—4.9 KiB✅
      CodexLive turn WebSocket wire—1.2 KiB—2.0 KiB✅
      CodexLive turn WebSocket decoded—20.4 KiB—29.3 KiB✅
      CodexLive turn messages—2—8✅
      ClaudeTotal thread wire—4.9 KiB—6.8 KiB✅
      ClaudeThread snapshot wire—3.7 KiB—4.9 KiB✅
      ClaudeLive turn WebSocket wire—1.2 KiB—2.0 KiB✅
      ClaudeLive turn WebSocket decoded—20.8 KiB—29.3 KiB✅
      ClaudeLive turn messages—2—8✅

      Baseline: unavailable · PR result: 65fd639 · Source CI: success

      Scenario and decoded snapshot size

      10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

      • Codex decoded thread snapshot: 106.1 KiB
      • Claude decoded thread snapshot: 106.4 KiB

      Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

    4. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Not approved

      Macroscope's review found this PR not approvable — The requested comparison is a large multi-area branch rather than an isolated queue enhancement, with new runtime workflows, authentication-sensitive changes, production deployment/default changes, and added diagnostic suppressions. An unresolved High-severity finding also identifies publicly dispatchable server lifecycle callbacks that require human attention.

      Not approved because:

      • 1 blocking correctness issue found at or above your repo's Minimum Blocking Severity
      Adjust the Minimum Blocking Severity for this repo — including turning it Off — in [Settings](https://app.macroscope.com/pingdotgg/settings#Repos). You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    5. @@ -0,0 +2646,21 @@
      2646+ usageLimitContinuationOfRunId: Schema.optional(RunId),
      2647+ manualContinuationOfRunId: Schema.optional(RunId),
      2648+ usageLimitRecoveryRequestId: Schema.optional(CommandId),
      2649+ /** Resolve untargeted delivery against the server's serialized thread state. */
      2650+ deliveryIntent: Schema.optional(Schema.Literals(["auto", "steer", "restart"])),
      2651+ delegatedCompletion: Schema.optional(
      2652+ Schema.Struct({
      2653+ parentRunId: RunId,
      2654+ generation: PositiveInt,
      2655+ taskIds: Schema.Array(NodeId),
      2656+ }),
      2657+ ),
      2658+ dispatchMode: Schema.Union([
      2659+ Schema.Struct({ type: Schema.Literal("defer_start") }),
      2660+ Schema.Struct({ type: Schema.Literal("steer_active"), targetRunId: RunId }),
      2661+ Schema.Struct({ type: Schema.Literal("restart_active"), targetRunId: RunId }),
      2662+ Schema.Struct({ type: Schema.Literal("queue_after_active") }),
      2663+ Schema.Struct({ type: Schema.Literal("start_immediately") }),
      2664+ ]),
      2665+ }),
      2666+ Schema.Struct({
      macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      🟠 High src/orchestrationV2.ts:2666

      Authenticated clients can dispatch prepared-run.release, prepared-run.progress, and prepared-run.fail, allowing them to start or terminate a run before worktree/setup completes. These server-only lifecycle callbacks are currently part of the public OrchestrationV2Command schema; move them to OrchestrationV2InternalCommand so dispatchCommand cannot accept them.

      🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
      In file @packages/contracts/src/orchestrationV2.ts around line 2666:
      
      Authenticated clients can dispatch `prepared-run.release`, `prepared-run.progress`, and `prepared-run.fail`, allowing them to start or terminate a run before worktree/setup completes. These server-only lifecycle callbacks are currently part of the public `OrchestrationV2Command` schema; move them to `OrchestrationV2InternalCommand` so `dispatchCommand` cannot accept them.
    6. Deterministic server evidence supporting the explicit-resume behavior in this PR:

      1. Start a turn, queue A, then Stop with holdQueue: true.
      2. Send a new plain-text human turn while idle, queue B, and complete that turn. A and B remain held.
      3. Dispatch queue.resume: A starts; completing A automatically starts B in FIFO order.
      4. The controls without Stop drain automatically on completion. All cases also run with a preceding provider context handoff.

      Four synthetic runtime cases on current main pass on 611132c171f3. The same cases on the older installed Nightly source pass on 3e6b45028cee (20261005.2689). Real orchestration, event sink and in-memory SQLite; fake providers; no account, sleeps or polling. The tests await persisted starting events. The 95 focused runtime/Stop/background-stop tests, server typecheck and scoped lint/format also passed on the main-based branch.

      These cases reproduce the confusing held-queue behavior, but do not reproduce a missing completion wake after handoff. They support making the paused state and explicit Resume visible as this PR does. They introduce no implicit resumption or product-policy change. The test-only patch is available if useful here.

      Focused command: pnpm exec vp test run apps/server/src/orchestration-v2/runtimeLayer.test.ts -t 'diagnoses queue dispatch after completion'.

      Model: GPT-6.1-Sol. Harness: Codex in T3 Code.

    7. Has conflicts. Can you rebase?

    8. Thanks for the earlier work on resuming a stopped queue. #22790 (96f09c6558) now lets users send the first or any selected held message, releasing the queue without continuing the stopped run. The queue UI has since moved into the timeline; if a separate paused indicator or resume control still matters, a smaller PR focused on that would be welcome.

    9. juliusmarminge closed this

Sign in to join this conversation.