Skip to content

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

Closed
juliusmarminge wants to merge 810 commits into
mainfrom
t3code/resume-paused-queue
Closed

juliusmarminge wants to merge 810 commits into
mainfrom
t3code/resume-paused-queue

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

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

juliusmarminge and others added 30 commits September 24, 2026 22:54
…#12514)

Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Build run-control callbacks outside the startup scope and release the initial handoff callback after turn acceptance or failure. Background event workers retain live routing identities without pinning completed thread history. Add isolated GC regressions for regular turns, handoffs, compaction, and failed startup.
Read lineage, delivery ownership, queue eligibility, and checkpoint capture targets without decoding unrelated tool history. Preserve full handoff and delegated cohort state when a queued run or delegated delivery actually needs it.
Co-authored-by: shivam <91240327+shivamhwp@users.noreply.github.com>
Co-authored-by: shivam <91240327+shivamhwp@users.noreply.github.com>
Co-authored-by: shivam <91240327+shivamhwp@users.noreply.github.com>
Co-authored-by: shivam <91240327+shivamhwp@users.noreply.github.com>
juliusmarminge and others added 4 commits October 1, 2026 01:55
A conflict from ProjectService.create means another project owns the
claimed folder, so createNamedProject no longer removes it then. Other
rejections remove it only after checking that no project owns the path.

Cleanup before the create is dispatched now runs on any non-success exit,
an interrupt included, so cancelled creates no longer leave folders behind
and use up the -2...-100 names. After the create is dispatched an interrupt
still keeps the folder, because the create may have committed.

t3_project_create without workspaceRoot rejects defaultModelSelection like
scripts. Project creation records no model default (only an update does),
so it would otherwise be dropped silently.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…efactor

Brings in #14546 (stop stranded thinking after a steer), a client-only
change to four web and mobile files this pair does not touch.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
After stopping a run the queue is paused, and the composer's only action
continued the stopped run with "Continue where you left off." There was no way
on web to send the paused queued message itself.

The queue header now reads "Queue paused" with a Resume queue action that sends
the next queued message. The composer's Resume keeps continuing the stopped run
first. Mobile's existing Resume queue label no longer claims the hold came from
a restart.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. label Oct 1, 2026
@juliusmarminge juliusmarminge added the macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews label Oct 1, 2026
@github-actions github-actions Bot added the size:M 30-99 changed lines (additions + deletions). label Oct 1, 2026
@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

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

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire — 4.9 KiB — 6.8 KiB ✅
Codex Thread snapshot wire — 3.7 KiB — 4.9 KiB ✅
Codex Live turn WebSocket wire — 1.2 KiB — 2.0 KiB ✅
Codex Live turn WebSocket decoded — 20.4 KiB — 29.3 KiB ✅
Codex Live turn messages — 2 — 8 ✅
Claude Total thread wire — 4.9 KiB — 6.8 KiB ✅
Claude Thread snapshot wire — 3.7 KiB — 4.9 KiB ✅
Claude Live turn WebSocket wire — 1.2 KiB — 2.0 KiB ✅
Claude Live turn WebSocket decoded — 20.8 KiB — 29.3 KiB ✅
Claude Live 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.

@juliusmarminge
juliusmarminge marked this pull request as ready for review October 1, 2026 16:00
@macroscopeapp

macroscopeapp Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

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. You can add or adjust custom eligibility rules. Learn more.

Resuming mid-edit would send the saved text instead of the draft being edited.
The action is disabled during an edit, with a tooltip saying why, and the
handler rejects it too.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The button stayed enabled during thread detail loading and checkpoint reverts,
where onResume returns without doing anything. It now uses the same conditions.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Comment thread apps/web/src/components/ChatView.tsx Resolved
…s the queue

The server rejects queue.resume while a usage-limited run blocks the queue, so
the action failed and replaced the limit error. It is disabled in that state,
with a tooltip pointing to the composer's Resume, which continues the limited
run and then the queue.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Base automatically changed from t3code/codex-turn-mapping to main October 2, 2026 19:22
Schema.Struct({ type: Schema.Literal("start_immediately") }),
]),
}),
Schema.Struct({

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 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.

@marcuscastelo

Copy link
Copy Markdown

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.

@kaovilai

kaovilai commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Has conflicts. Can you rebase?

TomCohenDev pushed a commit to TomCohenDev/t3code that referenced this pull request Oct 18, 2026
…age limit

Resume queue sent the saved text while a queued message was being edited, and
the server refused it when a usage limit held the queue.

- Web and mobile disable Resume queue while a queued message is edited.
- Web routes Resume queue through the composer's Resume when a usage limit
  holds the queue: it continues the limited run, then the queue. Mobile has no
  way to continue a limited run, so it disables Resume queue and says why.
- The shared queue workflow state reports heldByUsageLimit with the server's
  own rule (usageLimitBlockedRun).

Fork guards until upstream pingdotgg#14617 lands; replace with upstream when it merges.

Copy link
Copy Markdown
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews size:M 30-99 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.